Results 1 to 5 of 5

Thread: [2005] Anyone know how to Lock a dialog?

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Mar 2007
    Posts
    200

    Resolved [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.

  2. #2
    Addicted Member Abrium's Avatar
    Join Date
    Feb 2007
    Location
    The Great State of Texas
    Posts
    205

    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.

  3. #3
    Lively Member Shardox's Avatar
    Join Date
    Nov 2006
    Location
    Barcelona, Spain
    Posts
    123

    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()

  4. #4

    Thread Starter
    Addicted Member
    Join Date
    Mar 2007
    Posts
    200

    Re: [2005] Anyone know how to Lock a dialog?

    o i FORGOT, cos i always use from2.show instead of .showdialog! thanks guys!

  5. #5
    Addicted Member Abrium's Avatar
    Join Date
    Feb 2007
    Location
    The Great State of Texas
    Posts
    205

    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
  •  



Click Here to Expand Forum to Full Width