[DllImport("user32.dll")]
static extern bool SetForegroundWindow(IntPtr hWnd);
Private Declare Function SetForegroundWindow Lib "user32" (ByVal hwnd As IntPtr) As Long
None.
None.
Please add some!
Public Sub RaiseOtherProcess()
Dim proc As Process = Process.GetCurrentProcess()
Dim assemblyName As String = System.Reflection.Assembly.GetExecutingAssembly().GetName().Name
For Each otherProc As Process In Process.GetProcessesByName(AssemblyName)
If Not (proc.Id = otherProc.Id) Then
Dim hWnd As IntPtr = otherProc.MainWindowHandle
If IsIconic(hWnd) Then
ShowWindowAsync(hWnd, SW_RESTORE)
End If
SetForegroundWindow(hWnd)
Return
End If
Next
End Sub
Do you know one? Please contribute it!