|
this.Hide (); // hide itself first
Form2 frm = new Form2 ();
frm.ShowDialog (); // Show Form2
this.Show () // After Form2 is off, show yourself again
The garbage collection mechanism works according to the remaining amount of your system memory. If the memory is large enough, it basically does not collect anything.
People who have seen the MS VB.NET development team said before: If you really want to see the GC work, you can feel it by inserting 128M |
|