Vb6 2 Vb.net

Geek.NET

New member
Joined
Jun 19, 2004
Messages
4
Programming Experience
1-3
Hi every one!

I'm a very new to VB.NET, and I had an application which I wanted to upgraded to VB.NET, I used the VS.NET wizard to upgrade the application, but I had some difficulty to convert the follwoing statemensts from VB6 to VB.NET

1-
im OneForm As Form

For Each OneForm In forms
OneForm.Close()

Next OneForm
(i have some forms that I have loaded it in VB6 using the Load(FormName)
Formname.Show
after exsiting the application I wanted to execute the For ...in ...Next statement)

2-

Form_Unload(Cancel As Integer)

cancel = 1


 

Paszt

Staff member
Joined
Jun 3, 2004
Messages
1,500
Location
Raleigh, NC - USA
Programming Experience
Beginner
In VB.NET once the main thread closes, all other threads are automatically closed. (The other forms are the other threads). The main thread could be a form or a procedure located in a class or module.

Are you trying to close all the forms?
 

Geek.NET

New member
Joined
Jun 19, 2004
Messages
4
Programming Experience
1-3
hi...
hmm...ya in VB6 I was trying to close all the forms that is loaded in the memory...coz I use the Load(Formname) function to load my form instances...but since there is a warning about this way in VB.NET I'm not sure wether it necessary at all to implement the old way in VB6 again, or it is not necessary at all...my forms in vb6 were not maid as a child of MDI...but separate...
thank you...
 
Top Bottom