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
Mick Negendahl
NA
7
1.5k
Problem with closing other instances of my application
Feb 8 2012 5:38 AM
Hi guys!
I need my program to close old instances of it, when a new one comes up. I did my code like this:
public void killInstance()
{
Process[] Denlillehjaelper;
Denlillehjaelper = Process.GetProcessesByName("Den lille hjælper");
foreach (Process MyProcess in Denlillehjaelper)
{
MyProcess.CloseMainWindow();
MyProcess.Close();
}
}
And I call this from later in my code.
I can see it accurately runs this piece of code (i did a messagebox.show - just to check) but it dosent close the old instances of my application.
Maybe someone could help me? :)
Reply
Answers (
6
)
"Multiple-step OLE DB operation generated errors. Check each OLE DB status value, if available. No work was done." error when combobox selected index changed
Regex problem