Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
To show or not to show, that is the question
Message
Information générale
Forum:
ASP.NET
Catégorie:
Formulaires
Versions des environnements
Environment:
VB.NET 1.1
OS:
Windows XP SP2
Network:
Windows XP
Database:
MS SQL Server
Divers
Thread ID:
01001677
Message ID:
01001689
Vues:
14
>I need to determine if a form is to continue load based upon a specific condition. What I need to know is how to STOP a form before it SHOWs.

I am not sure if this is the best way to handle this, but you could set a ReadOnly field in the form's constructor method:
Dim myForm As MyFormClass

If myForm.IsOKToShow Then
   myForm.Show()
End If

Class MyFormClass
   Inherits System.Windows.Forms.Form

   Public ReadOnly IsOKToShow As Boolean

   Public Sub New()
      If (Logic here to determine whether or not to show the form) Then
         Me.IsOKToShow = True
      Else
         Me.IsOKToShow = False
      End If
     End Sub

End Class
Chris McCandless
Red Sky Software
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform