|
发表于 2023-9-18 20:10:12
|
显示全部楼层
|
本帖最后由 24779987 于 2023-9-18 20:24 编辑
请教一个问题 win d 或者任务栏”返回桌面“ 返回桌面后会隐藏所有窗口(并不是最小化窗口),如果添加 $ws_ex_topmost 拓展样式后窗口会置顶不会被隐藏,但是这样窗口会在所有其他窗口之前,请大佬赐教怎么才能 不被 “返回桌面” 隐藏窗口,且窗口在桌面上,请赐教!
- #requireadmin
- #include
- #include
- #include
- #include
- #include
- #include
- local $smyautoittitle = "network_info" ;
- if winexists($smyautoittitle) then exit ;检测程序是否重复运行
- autoitwinsettitle($smyautoittitle)
- local $networkadapterinfo = _networkadapterinfo()
- local $ipadd = $networkadapterinfo[1][4]
- local $macadd = $networkadapterinfo[1][8]
- local $dns = $networkadapterinfo[1][5]
- local $form1
- local $iwidth = 230, $iheight = 300, $ix = @desktopwidth - $iwidth, $iy = 0
- #region ### start koda gui section ### form=
- $form1 = guicreate("network_info", $iwidth, $iheight, $ix, $iy, $ws_popup, $ws_ex_layered $ws_ex_toolwindow $ws_ex_topmost)
- guisetbkcolor(0xf1f1f1)
- _winapi_setlayeredwindowattributes($form1, 0xf1f1f1, 0, $lwa_colorkey) ;设置透明
- $label1 = guictrlcreatelabel("计算机名:" & @computername, 0, 10, 300, 50)
- $label2 = guictrlcreatelabel("系统版本:" & @osversion & " " & @osarch, 0, 30, 300, 50)
- $label3 = guictrlcreatelabel("ip地址 :" & $ipadd, 0, 50, 300, 50)
- $label4 = guictrlcreatelabel("mac地址 :" & $macadd, 0, 70, 300, 50)
- $label5 = guictrlcreatelabel("dns地址 :" & $dns, 0, 90, 300, 50)
- guictrlsetcolor($label1, 0xffffff)
- guictrlsetcolor($label2, 0xffffff)
- guictrlsetcolor($label3, 0xffffff)
- guictrlsetcolor($label4, 0xffffff)
- guictrlsetcolor($label5, 0xffffff)
- guisetstate(@sw_show,$form1)
- #endregion ### end koda gui section ###
- local $networkadapterinfo = _networkadapterinfo()
- opt("traymenumode", 3)
- traysetclick("9")
- trayseticon("ip.ico")
- traysetstate($tray_iconstate_show)
- traysettooltip("ip地址:" & $networkadapterinfo[1][4])
- $menuitem1 = traycreateitem("ip :" & $networkadapterinfo[1][4])
- $menuitem2 = traycreateitem("mac :" & $networkadapterinfo[1][8])
- traycreateitem("dns :" & $networkadapterinfo[1][5])
- traycreateitem("")
- $menuitem3 = traycreateitem("信息报修")
- traycreateitem("")
- $menuitem4 = traycreateitem("exit")
- while 1
- $msg = traygetmsg()
- select
- case $msg = $menuitem1
- _clipboard_setdata($networkadapterinfo[1][4])
- traytip("当前ip地址已复制到剪贴板", $networkadapterinfo[1][4], 0, $tip_iconasterisk)
-
- case $msg = $menuitem2
- _clipboard_setdata($networkadapterinfo[1][8])
- traytip("当前mac地址已复制到剪贴板", $networkadapterinfo[1][8], 0, $tip_iconasterisk)
-
- case $msg = $menuitem3
-
- case $msg = $menuitem4
- exitloop
- exit
- endselect
- wend
复制代码 |
|