View Full Version : [SOLVED]Close
misiek08
18th September 2008, 16:15
Hi!
I am from Poland - sry for my bad English.
I create program with InSim External and when i close my app with X process is in taskmgr.exe. I can 't kill process. Language: C# .NET 3.0
Silox
18th September 2008, 18:31
I don't know how it works in C# but in Pseudo VB code it's something like this:
Sub Close
Me.close()
End sub
misiek08
18th September 2008, 19:41
I have one message. When I click X button he don 't kill process but when I make button File -> Close and set to it:
InSim.Close();
Application.Exit();
all works good and process has been killed.
I think that 's:
This doesn 't work:
private void Main_LFS_Tool_FormClosing(object sender, FormClosingEventArgs e)
{
InSim.Close();
while (MessageBox.Show("Exit application?", "", MessageBoxButtons.YesNo) ==
DialogResult.No)
{
}
Application.Exit();
}
My definition of form is:
public partial class Main_LFS_Tool : Form
I make my program in Microsoft Visual C# 2008 Express. I'm learning in C#
Silox
20th September 2008, 06:38
Why do you use a while? Normally I use something like this: (VB Pseudo again ;) )
a = Msgbox.show (...)
if a = 1
Me.Close()
Insim.Close()
end if
a should save the return from the Msgbox (yes or no)...
misiek08
20th September 2008, 11:45
I have detect one.
When i create a menustrip with button end and i make function to this is good but
private void......
aren't executed bicos i don 't see MessageBox
vBulletin® v3.8.6, Copyright ©2000-2012, Jelsoft Enterprises Ltd.