|
-
Apr 23rd, 2007, 12:34 AM
#1
Thread Starter
Addicted Member
[2005] Anyone know how to Lock a dialog?
Here is my current scenario:
I am making a chess program(as to help me learn VB.Net), and when a Pawn reaches the end, it can promote, SO!
i want a dialog OR messagebox to pop up and make the user select which piece he wants to promote the pawn to.
Using a dialog, i do now know how to 'LOCK' so that when the user tries to go back to the mainForm, it wont allow it, just like a messagebox.
OR i could use a messagebox, but i do not know how to add extra objects/ or buttons into it.
Thanks =)
Last edited by Zapper; Apr 23rd, 2007 at 05:26 AM.
-
Apr 23rd, 2007, 12:38 AM
#2
Addicted Member
Re: [2005] Anyone know how to Lock a dialog?
add an extra form to your program and use .showdialog() so that the user can not get away from choosing the pawn because your "promote pawn" form will be modal instead of modeless.
example:
Code:
frmPromote.showdialog()
Abrium
Asking the beginners questions so you don't have to!
If by chance hell actually froze over and I some how helped you... Please rate.
-
Apr 23rd, 2007, 12:40 AM
#3
Lively Member
Re: [2005] Anyone know how to Lock a dialog?
Add a new form to your project and add the buttons or a combobox or whatever you want so the user can select the piece. Now, show this form with its showdialog method.
Form2.showdialog()
-
Apr 23rd, 2007, 02:42 AM
#4
Thread Starter
Addicted Member
Re: [2005] Anyone know how to Lock a dialog?
o i FORGOT, cos i always use from2.show instead of .showdialog! thanks guys!
-
Apr 23rd, 2007, 02:53 AM
#5
Addicted Member
Re: [2005] Anyone know how to Lock a dialog?
no problem don't forget to rate those that help you bud.
Abrium
Asking the beginners questions so you don't have to!
If by chance hell actually froze over and I some how helped you... Please rate.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|