Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
To show or not to show, that is the question
Message
General information
Forum:
ASP.NET
Category:
Forms
Environment versions
Environment:
VB.NET 1.1
OS:
Windows XP SP2
Network:
Windows XP
Database:
MS SQL Server
Miscellaneous
Thread ID:
01001677
Message ID:
01001689
Views:
15
>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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform