brideas Posted November 19, 2003 Posted November 19, 2003 I need some help, please.. :) I am currently in the process of writing a Setup Wizard for my software. I need to to jump from a form called Step1 to Step2 and vice verce. I am using the following syntax: Step1 t = new Step1(); t.ShowDialog(); t.close(); It actually is hiding the window and not closing it so it's adding up in the taskbar. Is there a way to have it close the window and terminate it from the system memory and taskbar? I have also tried to dispose the form but that doesn't work either. Any help would be greatfully appreciated! Thank you in advance. Quote
*Experts* Volte Posted November 19, 2003 *Experts* Posted November 19, 2003 ShowDialog causes the form to show modally, so t.Close() will not execute until t closes. The way you have it laid out is a bit of a catch-22 situation, but you can easily fix it. You need to close the form with Me.Close() from within the Step1 form. Quote
brideas Posted November 19, 2003 Author Posted November 19, 2003 I'm Sorry, i meant to say: this.Close(); not t.Close(); Quote
BenH Posted November 20, 2003 Posted November 20, 2003 Regardless of whether you meant this.Close() or t.Close(), code execution in that particular routine will stop until the t form has been closed. You should probably explore the differences in the .Show and .ShowDialog methods. If you call t's Show method instead, code execution will continue and this.Close() will be called. BUT, if this contains your application's entry point, calling Close() will cause your application to exit, thus closing with it the new t form. :) You could call this.Hide() instead. Quote
brideas Posted November 20, 2003 Author Posted November 20, 2003 Me.Close() does not work in C# Quote
bpayne111 Posted December 11, 2003 Posted December 11, 2003 Me.Close is vb's version of C#'s this.Close(); if you don't like the taskbar issue showing up when you open the form then change it's ShowInTaskbar property to False brandon Quote i'm not lazy i'm just resting before i get tired.
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.