943,815 Members | Top Members by Rank

Ad:
  • C# Discussion Thread
  • Unsolved
  • Views: 2896
  • C# RSS
Aug 16th, 2006
0

improve events speed

Expand Post »
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
Similar Threads
Reputation Points: 10
Solved Threads: 0
Newbie Poster
soheilshoolookh is offline Offline
4 posts
since Aug 2006
Aug 19th, 2006
0

Re: improve events speed

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
Featured Poster
Reputation Points: 480
Solved Threads: 276
Postaholic
Ramy Mahrous is offline Offline
2,189 posts
since Aug 2006
Aug 28th, 2006
0

Re: improve events speed

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
Reputation Points: 28
Solved Threads: 4
Posting Whiz in Training
Lord Soth is offline Offline
233 posts
since Mar 2006

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in C# Forum Timeline: Sharing an IMAGE amongst objects to save memory [C#]
Next Thread in C# Forum Timeline: Accesing controls on the form from custom method





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC