improve events speed

Reply

Join Date: Aug 2006
Posts: 4
Reputation: soheilshoolookh is an unknown quantity at this point 
Solved Threads: 0
soheilshoolookh soheilshoolookh is offline Offline
Newbie Poster

improve events speed

 
0
  #1
Aug 16th, 2006
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
Reply With Quote Quick reply to this message  
Join Date: Aug 2006
Posts: 2,065
Reputation: Ramy Mahrous is just really nice Ramy Mahrous is just really nice Ramy Mahrous is just really nice Ramy Mahrous is just really nice 
Solved Threads: 258
Featured Poster
Ramy Mahrous's Avatar
Ramy Mahrous Ramy Mahrous is offline Offline
Postaholic

Re: improve events speed

 
0
  #2
Aug 19th, 2006
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
BI Developer | LINKdotNET
B.Sc Computer Science, Helwan University
Technical blog | http://ramymahrous.wordpress.com
LinkedIn | http://www.linkedin.com/in/ramymahrous
Reply With Quote Quick reply to this message  
Join Date: Mar 2006
Posts: 233
Reputation: Lord Soth is an unknown quantity at this point 
Solved Threads: 4
Lord Soth's Avatar
Lord Soth Lord Soth is offline Offline
Posting Whiz in Training

Re: improve events speed

 
0
  #3
Aug 28th, 2006
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
Best regards,
Loren Soth

Crimson K. Software _________________________________________________________________ Crimson K. Blog
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:



Similar Threads
Other Threads in the C# Forum


Views: 2368 | Replies: 2
Thread Tools Search this Thread



Tag cloud for C#
About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2010 DaniWeb® LLC