Click here to Skip to main content
15,913,055 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: Some difficult task in VB.NET Pin
Charlie Williams13-Jan-05 6:22
Charlie Williams13-Jan-05 6:22 
GeneralRe: Some difficult task in VB.NET Pin
Mekong River14-Jan-05 4:53
Mekong River14-Jan-05 4:53 
Generalcalculate total time "Access" Pin
sevan13-Jan-05 4:10
sevan13-Jan-05 4:10 
GeneralRe: calculate total time "Access" Pin
Jim Matthews13-Jan-05 5:10
Jim Matthews13-Jan-05 5:10 
GeneralRe: calculate total time "Access" Pin
sevan13-Jan-05 19:33
sevan13-Jan-05 19:33 
GeneralRe: calculate total time "Access" Pin
Jim Matthews14-Jan-05 4:16
Jim Matthews14-Jan-05 4:16 
Generalshow form2 ........ Pin
Ritesh123413-Jan-05 4:05
Ritesh123413-Jan-05 4:05 
GeneralRe: show form2 ........ Pin
Charlie Williams13-Jan-05 5:51
Charlie Williams13-Jan-05 5:51 
Well, the short answer is
form2.Show()
Me.Close()
However, in reality it's not quite that simple. When you show your first form with Application.Run(New Form1()), the lifetime of the application is tied to the lifetime of your form. There's an article[^] by Marc Clifton on this site that explains how to switch top-level forms using a custom application context.

Another approach is to start the application with an object that knows how to launch and close the forms in your application. To start with, it would show the initial "view" of your application (Form1) and, upon request, switch to a different "view", which could be closing form1 and opening form2 or opening forms 2 or three and closing form1 conditionally or whatever.

The second approach is infinitely more flexible, but it also requires more work to implement.

Charlie

if(!curlies){ return; }
GeneralRe: show form2 ........ Pin
aprx16-Jan-05 0:38
aprx16-Jan-05 0:38 
QuestionBitmap to jpg in memory? Pin
[DK]KiloDunse12-Jan-05 23:55
[DK]KiloDunse12-Jan-05 23:55 
AnswerRe: Bitmap to jpg in memory? Pin
Ritesh123413-Jan-05 3:23
Ritesh123413-Jan-05 3:23 
GeneralRe: Bitmap to jpg in memory? Pin
[DK]KiloDunse13-Jan-05 3:35
[DK]KiloDunse13-Jan-05 3:35 
GeneralWWW to file Pin
paanoik12-Jan-05 23:05
paanoik12-Jan-05 23:05 
GeneralStopping a list of threads Pin
Rizwan Bashir12-Jan-05 22:50
Rizwan Bashir12-Jan-05 22:50 
GeneralRe: Stopping a list of threads Pin
MohammadAmiry12-Jan-05 23:29
MohammadAmiry12-Jan-05 23:29 
GeneralRe: Stopping a list of threads Pin
Rizwan Bashir12-Jan-05 23:43
Rizwan Bashir12-Jan-05 23:43 
GeneralRe: Stopping a list of threads Pin
Robert Rohde13-Jan-05 9:47
Robert Rohde13-Jan-05 9:47 
GeneralRe: Stopping a list of threads Pin
Rizwan Bashir13-Jan-05 20:11
Rizwan Bashir13-Jan-05 20:11 
Generala?how to conect oracle and dotnet Pin
san_12-Jan-05 18:46
san_12-Jan-05 18:46 
GeneralRe: a?how to conect oracle and dotnet Pin
Dave Kreskowiak13-Jan-05 2:12
mveDave Kreskowiak13-Jan-05 2:12 
Generaldatarow Pin
besah12-Jan-05 15:02
besah12-Jan-05 15:02 
GeneralRe: datarow Pin
Ritesh123413-Jan-05 3:28
Ritesh123413-Jan-05 3:28 
QuestionHow to format field value in crystal report Pin
viettho12-Jan-05 13:16
viettho12-Jan-05 13:16 
AnswerRe: How to format field value in crystal report Pin
Bad Sector12-Jan-05 19:01
Bad Sector12-Jan-05 19:01 
GeneralRe: How to format field value in crystal report Pin
viettho14-Jan-05 7:20
viettho14-Jan-05 7:20 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.