求助大佬
这是我在网上找到的代码 但是会报错- Const WM_SYSCOMMAND=&H112
- Const SC_MAXIMIZE=&HF030&
- Const lpWinTitle1="license - Mozilla Firefox"
- Const lpWinTitle2="正在打开 license.dat"
-
-
- Function SendMessage(lpWinTitle,wMsg,wParam,lParam)
- Dim WordApp
- Dim ShApp,colTask,oTask
- Set WordApp=CreateObject("Word.Application")
- Set colTask=wordapp.Tasks
- SendMessage=False
- For Each oTask In colTask
- If oTask.Visible And InStr(oTask.Name,lpWinTitle) Then
- oTask.SendWindowMessage wMsg,wParam,lParam
- SendMessage=true
- Exit For
- End If
- Next
- WordApp.Quit
- Set WordApp=Nothing
- End Function
-
- '最大化任务栏中名为ios的应用程序
- SendMessage "ios",WM_SYSCOMMAND,SC_MAXIMIZE,0
- SendMessage lpWinTitle1,WM_SYSCOMMAND,SC_MAXIMIZE,0
- SendMessage lpWinTitle2,WM_SYSCOMMAND,SC_MAXIMIZE,0
复制代码
|