2013-03-16 65 views

回答

5

尝试使用GetProcessesByName

Private Declare Function ShowWindow Lib "user32" (ByVal handle As IntPtr, ByVal nCmdShow As Integer) As Integer 
Sub ShowAppWindow() 
    Try 
     Dim localByName As Process() = Process.GetProcessesByName("met2") 
     For Each p As Process In localByName 
      ShowWindow(p.MainWindowHandle, 3) ' SW_MAXIMIZE 
     Next 
    Catch ex As Exception 
     ' do something 
    End Try 
End Sub 
相关问题