CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3

Thread: Forms

  1. #1
    Join Date
    Aug 2000
    Posts
    13

    Forms

    Is the following possible:

    1. Open a form that has a button on it
    2. When you click on the button it opens another form that behaves like an input box (it asks the user for information)
    3. When the user has supplied the information the second form closes
    4. The rest of the on-click actions of the first form are carried out.

    So, what I'm trying to do is get the first form to wait until the information has been supplied by the user, via form 2, before it continues with what it's supposed to do!

    Hope this makes sense!!!


  2. #2
    Join Date
    Jan 2000
    Location
    Olen, Belgium
    Posts
    2,477

    Re: Forms

    You can open the second form (the one that acts like the inpubox) as modal

    ' in the first form
    private Sub Command1_Click()
    '
    ' do some stuff
    '
    Form2.Show 1 ' 1 means modal
    '
    ' this will be executes as soon as Form2 unloads
    '
    End Sub






    Tom Cannaerts
    [email protected]

    The best way to escape a problem, is to solve it.
    Tom Cannaerts
    email: [email protected]
    www.tom.be (dutch site)

  3. #3
    Join Date
    Dec 1999
    Location
    Dublin, Ireland
    Posts
    1,173

    Re: Forms

    yes

    If you show a form modally, the code after that show command is not run until the form is hidden or unloaded.
    i.e.

    'pre show form code
    frmInput.Show vbModal
    'post show form code




    HTH,
    Duncan

    -------------------------------------------------
    Ex. Datis: Duncan Jones
    Merrion Computing Ltd
    http://www.merrioncomputing.com
    '--8<-----------------------------------------
    NEW -The printer usage monitoring application
    '--8<------------------------------------------

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

Featured