Click here to Skip to main content
15,886,055 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
I have a question about button's event.
In my PJ, I want active the results that when I click and hold a button:

1) > 2 second's -> show 'Are you sure ...'
2) <= 2 second's -> show 'OK'

My thinks:
1) keyDown/Click -> Record current DateTime as dtKeyDow
2) KeyUp -> DateTime.Now - dtKeyDow
Unfortunately, when I click this Button, that never execute the KeyUp event.

So, I need you help, Please! TKS...

:sigh:
Posted
Comments
DavidKiryazi 23-Oct-10 2:51am    
maybe put some code up so we can see what you're doing. Maybe you're supressing the event somehow?

The KeyDown/KeyUp events are only for keyboard key presses, for mouse button presses you need access to the MouseUp/MouseDown event, your problem is that the .Net compact framework doesn't give access to these events for buttons so you would need to create you own button.

Have a look at this[^] MSDN article.
 
Share this answer
 
Comments
yoyolin1234 25-Oct-10 20:44pm    
Thank you so much...
:confused: :( :sigh: !!!!!!!!
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900