-1
我正在运行另一个程序,其进程名称是met2.exe
。 我怎样才能得到另一个程序最大化met2.exe
并保持它在开始栏中打开?如何让vb显示(最大化)另一个进程(窗口)
我正在运行另一个程序,其进程名称是met2.exe
。 我怎样才能得到另一个程序最大化met2.exe
并保持它在开始栏中打开?如何让vb显示(最大化)另一个进程(窗口)
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