|
Rank: Member Groups: Member
Joined: 8/5/2010 Posts: 16
|
I know I'm probably missing something simple here but....
I have Dialog that I am showing through code (VB.NET) I can see where to change the text that is displayed in the dialog, but I cannot figure out how to show a button there??
I simply need to show a message with 2 buttons, "Yes" or "No" and capture what button was used to close the dialog.
How do I do that??
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,194
|
Hi,
You would just right click the dialog, then select "Edit Template -> Content Template", that would switch the dialog into template editing mode and turn it into a container. You can then put whatever control in it.
Thanks!
|
|
Rank: Member Groups: Member
Joined: 8/5/2010 Posts: 16
|
That's perfect thank you, I knew it would be something simple :)
|
|
Rank: Member Groups: Member
Joined: 8/5/2010 Posts: 16
|
Sorry, but one more question...
how do I return the value of which button was clicked to close the form?
I have set the 'AcceptButton' and 'CancelButton' properties to the relevant buttons, but I'm not sure how to use the getResult option, do you have VB code example?
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,194
|
Hi,
You don't have to use AcceptButton or CancelButton. Just ignore the fact that the button is inside the dialog and handle the button's Click event the same way as you do with any other buttons.
Thanks
|
|
Rank: Member Groups: Member
Joined: 8/5/2010 Posts: 16
|
Ecellent,
thanks again
|
|