Activate a running program

xiaoxiao2021-04-09  324

Private Declare Function FindWindow Lib "user32" Alias ​​"FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String) As Integer Private Declare Function BringWindowToTop Lib "user32" (ByVal hwnd As Long) As Integer

'Here SCICALC is the window class name DIM HCALCWND as INTEGER = FINDWINDOW ("Scicalc", "Calculator")

IF hcalcwnd = 0 Then shell ("calc.exe", appwinstyle.normalfocus) Else BringWindowtotop (HCALCWND) END IF

转载请注明原文地址:https://www.9cbs.com/read-133009.html

New Post(0)