Problem with creating Multiple instances of Form in VB!
Hello!
In my currently under-development application, I need to create multiple instances of a Form with no title bar (ControlBox = False). I do it this way ...
Private oForm as frmNote
Public Sub CreateFormInstance()
Set oForm = new frmNote
oForm.Show
End Sub
This code works perfect and creates the multiple instances of Form called frmNote. However, I'm facing one very interesting problem with it! When a new instance of frmNote is created and it's hidden behind any already open Application window, whenever I click frmMain (the main form which has a button to create instances of frmNote) Title bar, the instance of frmNote, which was behind a certain application window comes in front of the Application window automatically! Why this happens so? I don't want this to happen. Any work-around for this problem?
To put my problem in a better way, I have created a sample VB Project, which has similar functionality coded. I request you to please download the attached ZIP file and run it from your IDE. All the necessary information to mimic my problem situation is written on the Form. I don't understand why this problem occur as I never faced such issue before!
Bookmarks