How to pass a parameter to a Winform?


Author
Message
Edhy Rijo
E
StrataFrame VIP (4.6K reputation)StrataFrame VIP (4.6K reputation)StrataFrame VIP (4.6K reputation)StrataFrame VIP (4.6K reputation)StrataFrame VIP (4.6K reputation)StrataFrame VIP (4.6K reputation)StrataFrame VIP (4.6K reputation)StrataFrame VIP (4.6K reputation)StrataFrame VIP (4.6K reputation)
Group: StrataFrame Users
Posts: 2.4K, Visits: 23K
Hi,

I have a WinForm which I need to handle to either Hide or Close the form based on a parameter passed to the form.  I have the following code as part of my LaunchForm method:

loForm = CType(Activator.CreateInstance(FormType, Parameters), Form)

My question is where in the called form class I enter the code to handle the parameter?

I tried this code without sucess:

Private _HideThisform As Boolean = False

Public Sub New(ByVal tHideForm As Boolean)

     ' This call is required by the Windows Form Designer.

     InitializeComponent()

     ' Add any initialization after the InitializeComponent() call.

     _HideThisform = tHideForm

End Sub

Can anybody show me a sample code to handle a form's parameter?

Thanks!

Edhy Rijo

GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...





Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search