Is there a way to put a focus on a MessageBox button? Forexample, if I have a MessageBoxButton.RetryCancle and I want to put the focus on the Cancel button, how do I go about doing so?
Any help is appreciated.
ljCharlie
Printable View
Is there a way to put a focus on a MessageBox button? Forexample, if I have a MessageBoxButton.RetryCancle and I want to put the focus on the Cancel button, how do I go about doing so?
Any help is appreciated.
ljCharlie
have you looked at the default button parameter?
messagebox.Show (,,,,MessageBoxDefaultButton.Button1)
Many thanks for your reponse. No, I have not. But will MessageBoxDefaultButton.Button1 set the change the focus to the button1?
ljCharlie
Never mind, it doesn't work. I just tried with the MessageBoxDefaultButton.Button1 and it's not shifting the actual focus from the txtPassword to the button1. Button1 does have the focus...but it's not shifting from txtPassword textbox so that means txtPassword will still trying to catch the Enter key. I wish there is a lostfocus like the good old days of VB6.
ljCharlie