VB Code:
Declare Auto Function SetWindowPos Lib "user32" (ByVal hWnd As IntPtr, _
ByVal hWndInsertAfter As IntPtr, _
ByVal X As Integer, _
ByVal Y As Integer, _
ByVal cx As Integer, _
ByVal cy As Integer, _
ByVal uFlags As UInteger) As Boolean
VB Code:
Dim hEvtCmd As IntPtr
Dim bEvntStart As Boolean = False
Dim HWND_BOTTOM As New IntPtr(1)
Dim SWP_HIDEWINDOW As UInt32 = Convert.ToUInt32(&H80)
Do While Not bEvntStart
For Each oProcess In System.Diagnostics.Process.GetProcesses()
If oProcess.ProcessName.ToString = "evntcmd" Then
bEvntStart = True
hEvtCmd = oProcess.Handle
SetWindowPos(hEvtCmd, HWND_BOTTOM, 1, 1, 0, 0, SWP_HIDEWINDOW)
'MessageBox.Show("found it: " & CType(hEvtCmd, String))
End If
Next
Loop