Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Modeless Forms
Message
De
18/12/1998 09:24:16
 
 
À
Tous
Information générale
Forum:
Visual Basic
Catégorie:
Autre
Titre:
Modeless Forms
Divers
Thread ID:
00168827
Message ID:
00168827
Vues:
62
Here's an easy one (I think).

I want to show a "Searching..." dialog form when a user finishes a search form. At first my app's main form (called from Sub Main) was called as a modal form, then VB told me that I couldn't show a modeless form from within a modal form (the "Searching...." needs to be modeless so my query can execute and I don't want to move the execute code into the search screen - I want it to be generic).

The code goes something like this
Sub Main
    Dim frmFSplash As frmSplash
    Dim frmFMain As frmMain
        
    '// Load search screen - faster than
    '// loading/unloading all the time
    Load frmSearching
    
    '// Display splash screen
    Set frmFSplash = New frmSplash
    frmFSplash.Show vbModal
        
    '// Show main form
    Set frmFMain = New frmMain
    frmMain.Show ' NOW IT'S SHOWN AS A MODELESS FORM
End Sub
From frmFMain, the user can launch a modal form to fill in the search params then click OK. The control then goes back to the main form (frmFMain) which show's the search form, executes the query, then hides the search form in that order. This appears to work fine, BUT when I exit the main form (it's modeless now, remember), my code goes into never-never land. It never goes back to Sub Main. How can you make your main form modless so other modeless forms can be shown in/on it?

PLEASE HELP!!!
Répondre
Fil
Voir

Click here to load this message in the networking platform