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:
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
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.
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.