Click here to Skip to main content
15,910,118 members

Comments by Member 8089110 (Top 61 by date)

Member 8089110 25-Feb-16 8:15am View    
Sir,my form is invisible and i closed exe file by using end process in task manager

I have write code in following way please check it and here is write code for invisible form.


//start of the program

static void Main(string[] args)
{

if (IsApplicationAlreadyRunning() == true)
{
// MessageBox.Show("The application is already running");
return;
}
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);

Form1 frm = new Form1();
frm.Visible = false;

Application.Run(new Form1());
}

//Its used for Context Menu Item

private void showToolStripMenuItem_Click(object sender, EventArgs e)
{
this.Show();
}

private void hideToolStripMenuItem_Click(object sender, EventArgs e)
{
this.Hide();
}

private void exitToolStripMenuItem_Click(object sender, EventArgs e)
{
this.Close();
}

//showing error in notifyIcon1
public void ShowError(string str_error)
{
notifyIcon1.ShowBalloonTip(15000, "PharmaRackSoftworldSynchronizer", str_error, ToolTipIcon.Info);
}
Member 8089110 25-Feb-16 8:09am View    
Deleted
Sir,my form is invisible and i closed exe file by using task manager end process.
Member 8089110 25-Feb-16 6:15am View    
Yes sir,it is windows form based application but i havent used exit event handler or closed handler event.I am directly closed application by using task bar end process like we do in console application.
Member 8089110 25-Feb-16 5:48am View    
Its not working.I implimented code in c# console application.I used both event handler
exit application and also closing events
Member 8089110 25-Feb-16 5:07am View    
I am not impliment closing event handler in this application.I am directly closed application by using task bar.Its just like console application.