shine_jose
-6
Light Poster
Recommended Answers
Jump to PostYou need to get a
MainwindowHandle
and activate it using P/invoke SetForegroundWindow().[DllImport("user32.dll")] static extern bool SetForegroundWindow(IntPtr hWnd); private void button1_Click(object sender, EventArgs e) { System.Diagnostics.Process proc = (from n in System.Diagnostics.Process.GetProcesses() where n.ProcessName == "cmd" select n).FirstOrDefault(); if (proc == null) { MessageBox.Show("No such a …
All 4 Replies
kvprajapati
1,826
Posting Genius
Team Colleague
shine_jose
-6
Light Poster
shine_jose
-6
Light Poster
shine_jose
-6
Light Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.