how to override the priority of an event
-
hi in my application initially one button event occurs due to that it executes some function during that function execution if i press any character on the keyboad my keypress event should execute instead of completing the button pressed event code. how can i do that please help thanks in advance.
-
hi in my application initially one button event occurs due to that it executes some function during that function execution if i press any character on the keyboad my keypress event should execute instead of completing the button pressed event code. how can i do that please help thanks in advance.
-
hi in my application initially one button event occurs due to that it executes some function during that function execution if i press any character on the keyboad my keypress event should execute instead of completing the button pressed event code. how can i do that please help thanks in advance.
Conceptually, the Windows GUI architecture works by having a message queue containing the list of inputs a window has received and a message pump that pops items off the queue and executes their corresponding handlers one by one. In your case, the keypress event will be put in the queue and won't be processes until the button click handler completes. To get around this, you could delegate the button click handler code to a separate thread. This way, the button click handler returns quickly and the message pump processes your keypress. Of course, you would still need to code the handler of the keypress event and abort logic of the button click handler.
Regards Senthil [MVP - Visual C#] _____________________________ My Blog | My Articles | My Flickr | WinMacro