VB.NET - How to Close the current form when Open another?

Asked By S J on 07-Oct-04 04:50 PM
What I want to do is Open a New From when user click the button and close the currently open Form.

Following piece of code in Button Click don't work, 

        Dim NewForm As New SchoolCoding
        Dim CurrentForm As New frmStudent


You are creating a new instance - Asked By Dexter Dotnetsky on 07-Oct-04 06:38 PM

of "CurrentForm".

Dim NewForm As New SchoolCoding 


It doesn't work - Asked By S J on 08-Oct-04 09:06 AM

When I do what you suggested, It doesn't work, Whole application gets closed.

Hehe --- - Asked By Dexter Dotnetsky on 08-Oct-04 10:14 AM

Well, apparently that's because the Main form **IS** your whole application. In that case, you should simplye call the Hide method on the main form instead of closing it.

I mean, this should be pretty obvious! Well, at least you are learning, right?
form's close - Asked By xuzhen shu on 09-Oct-04 03:17 AM
tcpclient - Asked By Doug Lundin on 22-Oct-04 12:04 PM
I have a tcpclient.  I want my client to stay running and only shutdown when I select shutdown, which I have working.  When I send data from the client I can tell that the server is down.  My problem is that I want to be able to check to see if the server is down when the client is in an “idle”  or “wait” state with nothing to do. 
I have spent many hours trying to get my client to recognize when the server is down to no avail.  Any help would be appreciated.