TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Pisi Can
NA
27
5.2k
Detect Open Instance and Show It
Jul 12 2016 4:46 AM
Hi all!
I can check if the application is already running and show a message box that says "The app is already open, please double click on the system tray icon to show it". What I want is that when the user try to open the app again it shows the opened instance. How can I do that?
I check if the app is already open by the below codes:
string ProsesAdi = Process.GetCurrentProcess().ProcessName;
Process[] sonuc = Process.GetProcessesByName(ProsesAdi);
if (sonuc.Length > 1)
{
MessageBox.Show("Uygulama zaten açik. Sistem tepsisindeki simgeye çift tiklayin.", "Bilgi");
System.Environment.Exit(0);
}
else
{
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
Application.Run(new Form1());
}
Reply
Answers (
2
)
Data get in panel content
PDF file convert to MDB