找回密码
 加入
搜索
查看: 2467|回复: 2

右建菜单

[复制链接]
发表于 2008-5-30 04:57:45 | 显示全部楼层 |阅读模式
问个在GUICtrlCreateEdit创建右建菜单的例子     
   效果见图片

不知道AU3有没有查看本机当前网卡的输出输入流量的函数  如果有的话请说下   先谢谢了
希望好心人能提示下

[ 本帖最后由 qop1830 于 2008-5-30 19:31 编辑 ]

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有账号?加入

×
发表于 2008-5-30 08:41:29 | 显示全部楼层
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>


$Form1 = GUICreate("Form1", 303, 167, 328, 249)
$Label1 = GUICtrlCreateLabel("", 24, 64, 244, 17)
GUISetState(@SW_SHOW)

While 1
        $nMsg = GUIGetMsg()
        Switch $nMsg
                Case $GUI_EVENT_CLOSE
                        Exit

        EndSwitch
        $s1 = 0
        $s2 = 0
        $strComputer = "."
        $wbemServices = ObjGet("winmgmts:\\" & $strComputer & "\root\cimv2")
        $wbemObjectSet = $wbemServices.ExecQuery("Select * from Win32_PerfRawData_Tcpip_NetworkInterface")
        For $wbemObject In $wbemObjectSet
                $s1 = $s1 + $wbemObject.BytesReceivedPerSec
        Next
        Sleep(1000)
        $strComputer = "."
        $wbemServices = ObjGet("winmgmts:\\" & $strComputer & "\root\cimv2")
        $wbemObjectSet = $wbemServices.ExecQuery("Select * from Win32_PerfRawData_Tcpip_NetworkInterface")
        For $wbemObject In $wbemObjectSet
                $s2 = $s2 + $wbemObject.BytesReceivedPerSec
        Next
        $dd = $s2 - $s1
        GUICtrlSetData($Label1, "此刻每秒上传流量是:" & $dd)
WEnd
 楼主| 发表于 2008-5-30 08:47:08 | 显示全部楼层
     非常感谢!!!!!
上面那个是下载的速度  嘿嘿!!

在EDIT里加右建菜单是不是不可以的啊??

[ 本帖最后由 qop1830 于 2008-5-30 09:36 编辑 ]
您需要登录后才可以回帖 登录 | 加入

本版积分规则

QQ|手机版|小黑屋|AUTOIT CN ( 鲁ICP备19019924号-1 )谷歌 百度

GMT+8, 2024-4-30 18:11 , Processed in 0.075910 second(s), 20 queries .

Powered by Discuz! X3.5 Licensed

© 2001-2024 Discuz! Team.

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