Forms Loading...

P

Pat

VB.Net how do you give control of say Form2 from Form1
BUT make form2 stick around when form1 is .Dispose(d) of?


in VB6 it was easy... From Form1 I would.
--------------------------------------
Form2.show
Me.Unload


in VB.Net if I do this.. Form2 (the child in Class's Form1) is destroyed
--------------------------------------
Public Class Form1
Dim F2 as new Form2

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Button1.Click
F2.show
Me.Close()
End Sub
End Sub

-Pat
 
H

Hollywood

Speaking of form loading (and yeah, I used a bastardized version of your
formmanager), whats the best way to capture the Activated/Deactived events
on the root form to be able to gracefully close the app down when the OS
requests it?
 
P

Pat

Chris is there a vb.net version of this..?
in order to use it you have to add more C# code to it.. and I can't get
vb.net to take this code into my existing vb.net project. it's all ok until
I set the file to "Compile" then it complains about everything.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top