faqts : Computers : Programming : Languages : Visual basic : Visual basic .NET

+ Search
Add Entry AlertManage Folder Edit Entry Add page to http://del.icio.us/
Did You Find This Entry Useful?

5 of 7 people (71%) answered Yes
Recently 5 of 7 people (71%) answered Yes

Entry

Visual Basic .net: Form: Initialize: How to initialize variables before your form is created?

Dec 22nd, 2003 14:14
Knud van Eeden,


----------------------------------------------------------------------
--- Knud van Eeden --- 22 December 2003 - 11:13 pm -------------------

Visual Basic .net: Form: Initialize: How to initialize variables 
before your form is created?

---

In Visual Basic .NET, initialization code must be added to the form
constructor (Sub New()) after the call to InitializeComponent() as in
the following example:

---
---

Public Sub New()
 MyBase.New()
 ' This call is required by the Windows Forms Designer.
 InitializeComponent()
 ' Add your initialization code here.
 ' do something
End Sub

---

[help: source: program: Microsoft Visual Studio: search for 'form 
event changes']

----------------------------------------------------------------------