找回密码
 立即注册

QQ登录

只需一步,快速开始

搜索
热搜: 活动 交友 discuz
查看: 76|回复: 0

au3编写记录5_嵌入图标

[复制链接]

230

主题

17

回帖

822

积分

管理员

积分
822
发表于 2025-8-25 18:30:13 | 显示全部楼层 |阅读模式


  1. ;进度条实例
  2. #comments-start
  3. ProgressOn("进度条", "每秒增加10%", "0 % ")
  4. For $i = 10 to 100 step 10
  5.     sleep(1000)
  6.     ProgressSet( $i, $i & " % ")
  7. Next
  8. ProgressSet(100 , "完成", "完成")
  9. sleep(500)
  10. ProgressOff()
  11. #comments-end

  12. ;运行dos
  13. #comments-start
  14. #include <Process.au3>
  15. $rc = _RunDos("set /p a=")
  16. #comments-end


  17. #include <GUIConstants.au3>

  18. ;示例1 ---------------------------
  19. GUICreate(" 我的图标")

  20. $icon = GUICtrlCreateIcon ("shell32.dll",10, 20,20)
  21. $icon2 = GUICtrlCreateIcon ("explorer.icl",10, 20,80)
  22. $icon3 = GUICtrlCreateIcon ("explorer.icl",6, 80,80)
  23. $n1=GUICtrlCreateIcon (@windowsdir & "\cursors\horse.ani",-1, 20,120,32,32)
  24. $n2=GUICtrlCreateIcon ("shell32.dll",7 ,20,160,32,32)
  25. GUISetState ()

  26. ; 运行脚本直到窗口被关闭
  27. While 1
  28.     $msg = GUIGetMsg()

  29.     If $msg = $GUI_EVENT_CLOSE Then ExitLoop
  30. Wend
复制代码


您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

QQ|Archiver|手机版|小黑屋|Discuz! X ( 陕ICP备2022004942号 )

GMT+8, 2025-9-3 14:35 , Processed in 0.079502 second(s), 18 queries .

Powered by Discuz! X3.5

© 2001-2025 Discuz! Team.

快速回复 返回顶部 返回列表