Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

Use the example hog gave you. Forms in .NET are classes, so you must use them as such. To use a class you must first instantiate it (you know, with the new keyword).

 

Dim frm As New form1()
frm.Show()

Gamer extraordinaire. Programmer wannabe.
Guest mutant
Posted

To release memory taken by it type:

formname.Dispose()

  • *Experts*
Posted

You only need to call Dispose if you showed the form using ShowDialog. If you just used form.Show(), you don't have to call Dispose().

 

-Nerseus

"I want to stand as close to the edge as I can without going over. Out on the edge you see all the kinds of things you can't see from the center." - Kurt Vonnegut
  • 4 weeks later...
Posted

Notify Icon

 

anyone run into a problem with a tray icon loading several times using the above method?

 

Dim frmMain as new FormMain()

frmMain.show()

 

 

If you have a tray icon (Notify Icon) loading with your Main form and switch from a second form back to the form using the Notify Icon, it loads another icon into the tray each time.

Posted
Nerseus, how's that, that you don't need to call the dispose method when you use the show, only when you use the ShowDialog method??? This means that in my app I've beed doing things wrong????, why in every place around the internet they say that if you want to unload, close the form you need to call the dispose method the gice the GC chance to clean up the memory???
Fat kids are harder to kidnap

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...