右建菜单
问个在GUICtrlCreateEdit创建右建菜单的例子效果见图片
不知道AU3有没有查看本机当前网卡的输出输入流量的函数如果有的话请说下 先谢谢了
希望好心人能提示下
[ 本帖最后由 qop1830 于 2008-5-30 19:31 编辑 ] #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 :face (38): :face (38): 非常感谢!!!!!
上面那个是下载的速度嘿嘿!!
在EDIT里加右建菜单是不是不可以的啊??
[ 本帖最后由 qop1830 于 2008-5-30 09:36 编辑 ]
页:
[1]