Board logo

标题: [问题求助] VBS 怎么将在任务栏的程序弹出到桌面显示 [打印本页]

作者: kailis123    时间: 2021-12-17 09:45     标题: VBS 怎么将在任务栏的程序弹出到桌面显示

求助大佬
这是我在网上找到的代码 但是会报错
  1. Const WM_SYSCOMMAND=&H112
  2. Const SC_MAXIMIZE=&HF030&
  3. Const lpWinTitle1="license - Mozilla Firefox"
  4. Const lpWinTitle2="正在打开 license.dat"
  5. Function SendMessage(lpWinTitle,wMsg,wParam,lParam)
  6. Dim WordApp
  7. Dim ShApp,colTask,oTask
  8. Set WordApp=CreateObject("Word.Application")
  9. Set  colTask=wordapp.Tasks
  10. SendMessage=False
  11. For Each oTask In colTask
  12. If oTask.Visible And InStr(oTask.Name,lpWinTitle) Then
  13. oTask.SendWindowMessage wMsg,wParam,lParam
  14. SendMessage=true
  15. Exit For
  16. End If
  17. Next
  18. WordApp.Quit
  19. Set WordApp=Nothing
  20. End Function
  21. '最大化任务栏中名为ios的应用程序
  22. SendMessage "ios",WM_SYSCOMMAND,SC_MAXIMIZE,0
  23. SendMessage lpWinTitle1,WM_SYSCOMMAND,SC_MAXIMIZE,0
  24. SendMessage lpWinTitle2,WM_SYSCOMMAND,SC_MAXIMIZE,0
复制代码





欢迎光临 批处理之家 (http://www.bathome.net/) Powered by Discuz! 7.2