locked
How to bring front other Application? RRS feed

  • Question

  • I have 2 application program.

    Program A has a button to call Program B.

    Program B is in the System tray.

    If click button from A, the Program B should be brought to the front.

    How can I do this?

    Monday, July 1, 2019 3:38 AM

Answers

All replies

  • Hi Jeff,

    You can use the Show() or ShowDialog() method to bring up the form. Please look into the below articles. Hope this will help you.

    Form.Show(IWin32Window) Method

    What's the difference between Show(), ShowDialog() and Application.Run() functions?


    Monday, July 1, 2019 4:55 AM
  • I want to bring front other application program from different program.
    Monday, July 1, 2019 5:47 AM
  • Hi Jeff0803,

    Thank you for posting here.

    For your question, you want to bring front program B when clicking the button in program A.

    Code:


     private void Button1_Click(object sender, EventArgs e)
            {
                this.Hide();
                Process.Start("D:\\test.exe");
            }

    Result:

    Best Regards,

    Jack


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.


    Monday, July 1, 2019 8:37 AM
  • Hi 

    Is your problem solved? If so, please post "Mark as answer" to the appropriate answer. So that it will help other members to find the solution quickly if they face the similar issue.

    Best Regards,

    Jack


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Friday, July 5, 2019 8:06 AM