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
jesu raj
NA
23
1.1k
Topmost window focus
Mar 9 2016 1:56 AM
I have a very strange issue.
I have two application.
For example:
Process1.exe launching Process2.exe. (This is done using Process.WaitForExit(), Process1 will wait till Process2 gets closed.)
Sample code for this case.
Process p =
new
Process();
p.StartInfo.FileName = strFilePath;
string
strDirectory = System.IO.Path.GetDirectoryName(strFilePath);
p.StartInfo.WorkingDirectory = strDirectory;
p.Start();
p.WaitForExit();
Now the Process2.exe is launching remote desktop using a pre-configured RDP(Remote Desktop Protocal) file.
This is done by using the below code.
System.Diagnostics.Process remoteWindow =
new
System.Diagnostics.Process();
remoteWindow.StartInfo.FileName = MSTSC_PROCESS_NAME;
remoteWindow.StartInfo.Arguments = strUrl; // RDP file path
remoteWindow.StartInfo.WindowStyle = ProcessWindowStyle.Maximized;
result = remoteWindow.Start();
Now the issue is when we close the remote desktop window, focus is moving to Process1.exe. Actually windows should retain focus on Process2.exe
Also, this issue is not occuring in all kind of PC's. This issue is occurring specifically in Panasonic CF-C1 laptop.
OS: Windows 7
Is this a windows related issue? or Any suggestions will help.
Reply
Answers (
0
)
How to create a property name with space?
Find Records based on Date Range C#