The Artima Developer Community
Sponsored Link •

C# Answers Forum
How to refresh main application UI when an external program is running?

0 replies on 1 page.

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 0 replies on 1 page
Yan Xie

Posts: 1
Nickname: yan17
Registered: Aug, 2005

How to refresh main application UI when an external program is running? Posted: Aug 17, 2006 2:37 PM
Reply to this message Reply
Advertisement
Hi,

This issue makes me headache and if somebody can give me some help, that'll be very appreciated.

In my main application UI (say a dialog) there is a button. When click on it, the notepad will be poped up. I did this by System.Diagnostics.Process.

My code is:
private void button1_Click(object sender, EventArgs e)
{
System.Diagnostics.Process process1 = new System.Diagnostics.Process();
process1.StartInfo.FileName = "Notepad";
process1.Start();
process1.WaitForExit();
}


When it's running, the notepad is toplevel active window, and when I drag and move it, the main dialog window can't be seen. I'm wondering how I can refresh the main dialog window so that the notepad window acts just like a modal dialog from the main dialog.

Any help? Thanks in advance.

Topic: passing crystal report variable to Form ... Previous Topic   Next Topic Topic: missing an assembly reference?

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use