|
-
Jul 15th, 2004, 05:48 AM
#1
Thread Starter
Fanatic Member
Closing a form
How can I close a form, which has my start point in it, without the application closing?
VB6 sp5, SQL Server 2000, C#
There are no stupid questions. Only stupid people. 
-
Jul 15th, 2004, 02:30 PM
#2
Sleep mode
I believe you can't (haven't checked this yet).
-
Jul 15th, 2004, 08:29 PM
#3
Fanatic Member
-
Jul 15th, 2004, 08:36 PM
#4
Fanatic Member
just converted the inspired by dynamic_sysop code.
frmMain
PHP Code:
static void Main()
{
frmMain f=new frmMain();
f.Show();
Application.Run();
}
private void button1_Click(object sender, System.EventArgs e)
{
frmIDontKnow f=new frmIDontKnow(this);
f.Show();
}
private void frmMain_Closing(object sender, System.ComponentModel.CancelEventArgs e)
{
Application.Exit();
}
frmIDontKnow
PHP Code:
Form f;
public frmIDontKnow(Form f)
{
//
// Required for Windows Form Designer support
//
InitializeComponent();
this.f=f;
//
// TODO: Add any constructor code after InitializeComponent call
//
}
private void button1_Click(object sender, System.EventArgs e)
{
f.Close();
}
private void frmIDontKnow_Closing(object sender, System.ComponentModel.CancelEventArgs e)
{
Application.Exit();
}
hope this helps. if not, sorry.
Last edited by brown monkey; Jul 15th, 2004 at 08:53 PM.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|