Form Show

retkehing

Well-known member
Joined
Feb 5, 2006
Messages
153
Programming Experience
Beginner
Sorry for asking a beginner question, may i know what is the difference between the following two codes since both of them can show the form properly? Thank you.

VB.NET:
[SIZE=2][COLOR=#0000ff]Dim[/COLOR][/SIZE][SIZE=2] DisplayForm [/SIZE][SIZE=2][COLOR=#0000ff]As[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]New[/COLOR][/SIZE][SIZE=2] Form1[/SIZE]
[SIZE=2]DisplayForm.Show()[/SIZE]

VB.NET:
[SIZE=2]Form1.Show()[/SIZE]
 
Because i encounted problem of passing value from one form to another form. Dim DisplayForm AsNew didn't work for one of my functions whereas Form1.Show() fixed the problem.
 
Back
Top