Hi everybody.
I have 2 form : MainFrm is main form and Notification is form used to show notification.
In program.cs :
I use mutex to keep application run once. If application already running, form Notification will show.
But my code work not right, form Notification not shown.
In MainFrm, I has a static method showNotification (using Tulpep Notification). I try calling this method in static main, but it not working, too.
However, if I use MessageBox, it working fine.
I don't know where the problem is. Please help me.
I have 2 form : MainFrm is main form and Notification is form used to show notification.
In program.cs :
C#:
static void Main()
{
bool result;
Mutex mutex = new Mutex(true, "UniqueAppId", out result);
if (!result)
{
//MainFrm.showNotification("KyAppAPI??????????");
//MessageBox.Show("KyAppAPI??????????");
Notification notiBox = new Notification();
notiBox.Show();
return;
}
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
Application.Run(new MainFrm());
GC.KeepAlive(mutex);
}
I use mutex to keep application run once. If application already running, form Notification will show.
But my code work not right, form Notification not shown.
In MainFrm, I has a static method showNotification (using Tulpep Notification). I try calling this method in static main, but it not working, too.
However, if I use MessageBox, it working fine.
I don't know where the problem is. Please help me.