Results 1 to 5 of 5

Thread: Message Box / Dialogs: How do you do that?!?

  1. #1

    Thread Starter
    Member
    Join Date
    Jun 2001
    Location
    South Africa
    Posts
    35

    Question Message Box / Dialogs: How do you do that?!?

    How can I create my own dialogs (eg. Mesage box) that halt everything until they're done? I can't figure out how to make a function that only returns to it's calling code once the dialog form is unloaded. And also, how do you disable everything else on the screen so that the user can only click 'OK' on the dialog form or whatever?

  2. #2
    PowerPoster
    Join Date
    Jul 1999
    Posts
    5,923
    open the dialog form with the modal option...
    VB Code:
    1. frmMessage.Show vbModal

  3. #3
    DaoK
    Guest
    Ahhhhhhhhhhh thx chrisjk you learn me what modal is today!

  4. #4

    Thread Starter
    Member
    Join Date
    Jun 2001
    Location
    South Africa
    Posts
    35
    Right. Thanks!
    So this means that the code after this only runs when the form that was shown is unloaded?

  5. #5
    PowerPoster
    Join Date
    Jul 1999
    Posts
    5,923
    Yep,...here's a quick test you can do
    VB Code:
    1. ' Form1 Code
    2. Private Sub Command1_Click()
    3.  
    4. Form2.Show vbModal
    5. MsgBox "I continued only after form2 was closed"
    6.  
    7. End Sub

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