Results 1 to 3 of 3

Thread: Waiting for Form to unload

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Aug 1999
    Location
    Ilirska Bistrica, Slovenia
    Posts
    242
    Hello!

    I have sub where I show form and then execution of code behind Form1.show must wait until Form1 unloads. Something like that:

    Sub Main()
    Form1.show '(login form)
    'here must program execution stop until form1 is unloaded
    'but I don't know how can I do that
    ...
    ... 'other code
    ...
    End Sub

    Can anyone help me with that?
    Zvonko Bostjancic
    Ilirska Bistrica, Slovenia
    [email protected]
    Using VS6 Professional with SP3
    Programming mostly in VB and I've started to learn VC++ & MFC

  2. #2
    PowerPoster 2.0 Negative0's Avatar
    Join Date
    Jun 2000
    Location
    Southeastern MI
    Posts
    4,367
    Its really simple

    Code:
    sub main()
    form1.show 1
    'other code
    end sub
    The one makes the form get shown modally which makes it finish before any other code is executed.

    Hope this helps

  3. #3
    transcendental analytic kedaman's Avatar
    Join Date
    Mar 2000
    Location
    0x002F2EA8
    Posts
    7,221
    Code:
    sub main()
    form1.show
    Do while forms.count
      'Code here if you want to
      Doevents
    Loop
    'other code
    end sub
    Use
    writing software in C++ is like driving rivets into steel beam with a toothpick.
    writing haskell makes your life easier:
    reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
    To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.

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