| | |
improve events speed
![]() |
•
•
Join Date: Aug 2006
Posts: 4
Reputation:
Solved Threads: 0
hi,
I have written a win application program. In my application i have 5
picture boxes with mouse enter, mouse leave, mouse down, mouse up and
mouse click events applied. When each of these events occur I set the
image property. actually i have simulated 5 graphical buttons.
but they are very slow. when I move the mouse quickly over them it
seems that the application misses the events... and so the images of
picture boxes do not change. but such this problem doesn't occur in
delphi... Does anybody know how to improve speed of such events...
Or maybe I make mistake and it's result of something else..:rolleyes:
-Soheil
I have written a win application program. In my application i have 5
picture boxes with mouse enter, mouse leave, mouse down, mouse up and
mouse click events applied. When each of these events occur I set the
image property. actually i have simulated 5 graphical buttons.
but they are very slow. when I move the mouse quickly over them it
seems that the application misses the events... and so the images of
picture boxes do not change. but such this problem doesn't occur in
delphi... Does anybody know how to improve speed of such events...
Or maybe I make mistake and it's result of something else..:rolleyes:
-Soheil
Threading..
Try to call function in event instead execute some codes in the event itself and let the event start new thread and call the function within
Try to call function in event instead execute some codes in the event itself and let the event start new thread and call the function within
BI Developer | LINKdotNET
B.Sc Computer Science, Helwan University
Technical blog | http://ramymahrous.wordpress.com
LinkedIn | http://www.linkedin.com/in/ramymahrous
B.Sc Computer Science, Helwan University
Technical blog | http://ramymahrous.wordpress.com
LinkedIn | http://www.linkedin.com/in/ramymahrous
Hi,
The creation af a thread or calling a function from the event won't help at all because the creation of a new thread object and the thread it self on OS plus the necessary context switching to the workerThread are all overhead but no help. I would suggest increasing the applications process priority, not using mouse click event (mouse up will do) and call Application.DoEvents() at the end of your event codes.
Loren Soth
The creation af a thread or calling a function from the event won't help at all because the creation of a new thread object and the thread it self on OS plus the necessary context switching to the workerThread are all overhead but no help. I would suggest increasing the applications process priority, not using mouse click event (mouse up will do) and call Application.DoEvents() at the end of your event codes.
Loren Soth
Best regards,
Loren Soth
Crimson K. Software _________________________________________________________________ Crimson K. Blog
Loren Soth
Crimson K. Software _________________________________________________________________ Crimson K. Blog
![]() |
Similar Threads
- why is my Mac sooo much slower than my PC (OS X)
- Broadband Router (USB Devices and other Peripherals)
- improving latency on counter strike source can anyone help? (Windows Software)
- CPU not performing to spec (Motherboards, CPUs and RAM)
- Can i delete these startup Entries (Web Browsers)
- VB Combo Population (Visual Basic 4 / 5 / 6)
Other Threads in the C# Forum
- Previous Thread: Sharing an IMAGE amongst objects to save memory [C#]
- Next Thread: Accesing controls on the form from custom method
Views: 2368 | Replies: 2
| Thread Tools | Search this Thread |
Tag cloud for C#
.net 2d access algorithm application array asp.net assembly automation barchart bitmap box button c# calendar check checkbox class code color combo control csharp custom data database datagrid datagridview dataset datatable degrees directshow display dll drawing event excel expression file form format forms ftp function gcd gdi+ graphics image index instance interface internet list listbox listener login loop math multithreading mysql notepad office operator outlook2007 picturebox pixel prime print programming query remote remoting resource richtextbox saving search server socket sql sql-server statistics string text textbox threading time timer tutorial update url validation vc++ visual visualstudio webbrowser webcam windows winforms wpf xml






