I start a process from my application. This process spawns a secondary process that is always maximized. I want to minimize the secondary process from my code. I can obtain the handle to this process with the following code. Now that I have the handle, how do I minimize the process?
VB Code:
Dim hEvtCmd As IntPtr Dim bEvntStart As Boolean = False Do While Not bEvntStart For Each oProcess In System.Diagnostics.Process.GetProcesses() If oProcess.ProcessName.ToString = "evntcmd" Then bEvntStart = True hEvtCmd = oProcess.Handle MessageBox.Show("found it: " & CType(hEvtCmd, String)) End If Next Loop




Reply With Quote