Click here to Skip to main content
16,011,626 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
How i can press messagebox button whithout press keyboard key only click by mouse (namely when you press enter or space messagebox button is pressed but i want press just whit mouse)
Posted
Updated 10-Aug-12 22:12pm
v3

Move your mouse so that the pointer is over the button, and press and release the left hand button.

Why is this a problem for you?
And more to the point, how have you go here without knowing how to click on things?
 
Share this answer
 
Comments
amirmohamad 11-Aug-12 4:15am    
you did not notice me
OriginalGriff 11-Aug-12 4:37am    
Two possibilities here:
1) You are standing behind me, where I cannot see you.
2) You are not saying what you think you are.
What are you trying to do that you are having difficulty with? The replies you have at the moment exactly answer your problem as described, so we need better information if we are to help you.
amirmohamad 11-Aug-12 5:09am    
i need the code to not working keyboard key(enter,space) to press the messagebox button ok!
OriginalGriff 11-Aug-12 5:19am    
That's not a good idea from a user perspective - if they are used to enter actioning "OK" and space pressing the highlighted button (and most are by now) then removing that is going to frustrate and annoy users.
Besides, if you are using a standard message box as in MessageBox.Show(...) then you can't - it is a standard Windows item, and you can't alter it's behaviour. You could create your own message box, and subvert the keyboard handler - it isn't particularly difficult - but it's a lot of work for something with no obvious user benefit. Why do you want to do that?
amirmohamad 11-Aug-12 5:51am    
I create my massagebox and i want to determine which message press just by mouse. I have a solution regulation my button focus to a label and when press enter sweeping you think it's work
i have different way to do this
1-move your mouse to the messagebox
2-click mouse left button on it
3-release mouse button!

that's it!


problem?
 
Share this answer
 
Comments
[no name] 11-Aug-12 5:46am    
My Vote of 1:
He/She is not asking how to click, he want something like Handling KeyPress event of MessageBox that is not possible.
Read the question carefully then answer it.
Richard MacCutchan 11-Aug-12 6:07am    
My vote of 5. See version 1 of this question which is perfectly unclear.

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