Results 1 to 7 of 7

Thread: (Resolved) Check if form is loaded before starting another instance

Threaded View

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Nov 2005
    Posts
    259

    (Resolved) Check if form is loaded before starting another instance

    I have a Parent form that loads a child form and I only want to allow one instance of the child form. I have this on the button to open the form. Stepping through the code with the debugger it "appears" to work OK when the form is open (I say appears because nothing changes) but when the form is closed it doesn't open as I would expect. What am I missing?
    VB Code:
    1. '
    2.         Dim aForm As New frmCSA
    3.         If aForm Is Nothing Then
    4.             aForm.MdiParent = Me
    5.             aForm.Show()
    6.         Else
    7.             aForm.BringToFront()
    8.         End If
    Last edited by FastEddie; May 20th, 2009 at 08:23 AM.

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