|
本帖最后由 fengzishao 于 2014-7-9 00:17 编辑
如下图
代码如下;
#include <GUIConstantsEx.au3>
#include <GuiImageList.au3>
#include <GuiToolbar.au3>
#include <ImageListConstants.au3>
#include <ToolbarConstants.au3>
#include <WindowsConstants.au3>
#include <GuiMenu.au3>
#include <GuiConstantsEx.au3>
#include <ListViewConstants.au3>
#include <GuiStatusBar.au3>
#include <EditConstants.au3>
#include <GuiListView.au3>
#include <GUIConstantsEx.au3>
#include <GuiMenu.au3>
#include <GuiConstantsEx.au3>
#include <ButtonConstants.au3>
#include <GuiImageList.au3>
#include <GuiListView.au3>
#include <GuiToolBar.au3>
#include <GuiToolTip.au3>
#include <GuiStatusBar.au3>
#include <WindowsConstants.au3>
#include <WinAPI.au3>
#include <FontConstants.au3>
#include <StaticConstants.au3>
#Region ### START Koda GUI section ### Form=
Local $hGUI, $hFile, $hEdit, $hHelp, $hMain, $hSee, $HModular
Local Enum $e_idNew = 1000, $e_idOpen, $e_idSave, $e_idExit, $e_idCut, $e_idCopy, $e_idPaste, $e_idAbout, $e_idSee, $e_idMoudula
$Form1 = GUICreate("Form1", 715, 535, -1, -1, BitOR($WS_MAXIMIZEBOX, $WS_MINIMIZEBOX, $WS_SYSMENU, $WS_GROUP, $WS_TABSTOP, $WS_SIZEBOX))
; 创建"文件"的子菜单
$hEdit = _GUICtrlMenu_CreateMenu()
_GUICtrlMenu_AddMenuItem($hEdit, "基本设置", $e_idNew)
_GUICtrlMenu_AddMenuItem($hEdit, "设置服务器端口", $e_idOpen)
_GUICtrlMenu_AddMenuItem($hEdit, "", 0)
_GUICtrlMenu_AddMenuItem($hEdit, "卸载程序", $e_idSave)
_GUICtrlMenu_AddMenuItem($hEdit, "", 0)
_GUICtrlMenu_AddMenuItem($hEdit, "最小化到托盘", $e_idExit)
_GUICtrlMenu_AddMenuItem($hEdit, "退出控制台", $e_idExit)
; 创建主菜单
; 创建主菜单
$hMain = _GUICtrlMenu_CreateMenu()
_GUICtrlMenu_AddMenuItem($hMain, "基本(&B)", 0, $hEdit)
_GUICtrlMenu_AddMenuItem($hMain, "查看(&V)", 0, $hSee)
_GUICtrlMenu_AddMenuItem($hMain, "功能模块(&T)", 0, $HModular)
_GUICtrlMenu_AddMenuItem($hMain, "关于(&A)", 0, $hHelp)
; 设置窗口菜单
_GUICtrlMenu_SetMenu($Form1, $hMain)
$MenuItem1 = GUICtrlCreateMenu("基本(&B)")
$MenuItem2 = GUICtrlCreateMenuItem("基本设置", $MenuItem1)
$MenuItem3 = GUICtrlCreateMenuItem("设置服务器端口", $MenuItem1)
$MenuItem5 = GUICtrlCreateMenuItem("", $MenuItem1)
$MenuItem4 = GUICtrlCreateMenuItem("卸载程序", $MenuItem1)
$MenuItem5 = GUICtrlCreateMenuItem("", $MenuItem1)
$MenuItem5 = GUICtrlCreateMenuItem("最小化到托盘", $MenuItem1)
$MenuItem6 = GUICtrlCreateMenuItem("退出控制台", $MenuItem1)
$MenuItem7 = GUICtrlCreateMenu("查看(&V)")
$MenuItem11 = GUICtrlCreateMenuItem("MenuItem11", $MenuItem7)
$MenuItem10 = GUICtrlCreateMenuItem("MenuItem10", $MenuItem7)
$MenuItem9 = GUICtrlCreateMenuItem("MenuItem9", $MenuItem7)
$MenuItem8 = GUICtrlCreateMenuItem("MenuItem8", $MenuItem7)
$MenuItem12 = GUICtrlCreateMenu("功能模块(&T)")
$MenuItem13 = GUICtrlCreateMenuItem("MenuItem13", $MenuItem12)
$MenuItem14 = GUICtrlCreateMenuItem("MenuItem14", $MenuItem12)
$MenuItem15 = GUICtrlCreateMenuItem("MenuItem15", $MenuItem12)
$MenuItem16 = GUICtrlCreateMenuItem("MenuItem16", $MenuItem12)
$MenuItem17 = GUICtrlCreateMenuItem("MenuItem17", $MenuItem12)
$MenuItem18 = GUICtrlCreateMenu("关于(&A)")
$ToolBar1 = _GUICtrlToolbar_Create($Form1)
GUICtrlSetResizing(-1, $GUI_DOCKLEFT+$GUI_DOCKRIGHT)
_GUICtrlToolbar_SetButtonWidth($ToolBar1, 80, 100)
$ImageList1 = _GUIImageList_Create(32, 32, 5)
_GUIImageList_AddIcon($ImageList1, "d:\ico\1.ico", 0, True)
_GUIImageList_AddIcon($ImageList1, "d:\ico\2.ico", 0, True)
_GUIImageList_AddIcon($ImageList1, "d:\ico\3.ico", 0, True)
_GUIImageList_AddIcon($ImageList1, "d:\ico\4.ico", 0, True)
_GUIImageList_AddIcon($ImageList1, "d:\ico\5.ico", 0, True)
_GUIImageList_AddIcon($ImageList1, "d:\ico\6.ico", 0, True)
_GUIImageList_AddIcon($ImageList1, "d:\ico\7.ico", 0, True)
_GUICtrlToolbar_SetImageList($ToolBar1, $ImageList1)
Local $aStrings[7]
$aStrings[0] = _GUICtrlToolbar_AddString($ToolBar1, "基本设置")
$aStrings[1] = _GUICtrlToolbar_AddString($ToolBar1, "维护通道")
$aStrings[2] = _GUICtrlToolbar_AddString($ToolBar1, "窗口进程")
$aStrings[3] = _GUICtrlToolbar_AddString($ToolBar1, "桌面墙纸")
$aStrings[4] = _GUICtrlToolbar_AddString($ToolBar1, "网络安全")
$aStrings[5] = _GUICtrlToolbar_AddString($ToolBar1, "日志")
$aStrings[6] = _GUICtrlToolbar_AddString($ToolBar1, "关于")
_GUICtrlToolbar_AddButton($ToolBar1, 0, 0, $aStrings[0])
_GUICtrlToolbar_AddButtonSep($ToolBar1)
_GUICtrlToolbar_AddButton($ToolBar1, 0, 1, $aStrings[1])
_GUICtrlToolbar_AddButton($ToolBar1, 0, 2, $aStrings[2])
_GUICtrlToolbar_AddButton($ToolBar1, 0, 3, $aStrings[3])
_GUICtrlToolbar_AddButton($ToolBar1, 0, 4, $aStrings[4])
_GUICtrlToolbar_AddButtonSep($ToolBar1)
_GUICtrlToolbar_AddButton($ToolBar1, 0, 5, $aStrings[5])
_GUICtrlToolbar_AddButton($ToolBar1, 0, 6, $aStrings[6])
$ListView1 = GUICtrlCreateListView("机器名|IP|MAC|最后开机时间|状态|备注", 2, 80, 710, 300, 0)
_GUICtrlListView_SetExtendedListViewStyle($ListView1, BitOR($LVS_EX_GRIDLINES, $LVS_EX_FULLROWSELECT))
GUICtrlSetResizing(-1, $GUI_DOCKLEFT+$GUI_DOCKRIGHT+$GUI_DOCKTOP+$GUI_DOCKWIDTH+$GUI_DOCKBOTTOM)
GUICtrlSendMsg(-1, $LVM_SETCOLUMNWIDTH, 0, 80)
GUICtrlSendMsg(-1, $LVM_SETCOLUMNWIDTH, 1, 110)
GUICtrlSendMsg(-1, $LVM_SETCOLUMNWIDTH, 2, 110)
GUICtrlSendMsg(-1, $LVM_SETCOLUMNWIDTH, 3, 140)
GUICtrlSendMsg(-1, $LVM_SETCOLUMNWIDTH, 4, 60)
GUICtrlSendMsg(-1, $LVM_SETCOLUMNWIDTH, 5, 60)
$Edit1 = GUICtrlCreateEdit("", 2, 382, 530, 81, BitOR($ES_AUTOVSCROLL, $ES_AUTOHSCROLL, $ES_WANTRETURN, $WS_VSCROLL))
GUICtrlSetResizing(-1, $GUI_DOCKLEFT+$GUI_DOCKRIGHT+$GUI_DOCKSTATEBAR)
$Button1 = GUICtrlCreateButton("设置服务IP", 540, 436, 75, 25)
GUICtrlSetResizing(-1, $GUI_DOCKRIGHT+$GUI_DOCKSIZE+$GUI_DOCKBOTTOM)
$Button2 = GUICtrlCreateButton("停止服务", 625, 436, 75, 25)
GUICtrlSetResizing(-1, $GUI_DOCKRIGHT+$GUI_DOCKSIZE+$GUI_DOCKBOTTOM)
$Label1 = GUICtrlCreateLabel("服务状态:", 550, 400, 55, 17,$SS_RIGHT)
GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT)
GUISetState()
$test = GUICreate("", 710, 20, 1, 55, BitOR($WS_MAXIMIZEBOX, $WS_MINIMIZEBOX, $WS_CHILD, $WS_OVERLAPPED, $WS_POPUP), BitOR($WS_EX_MDICHILD, $WS_EX_TOOLWINDOW), $Form1)
$Toolbar2 = _GUICtrlToolbar_Create($test)
_GUICtrlToolbar_SetExtendedStyle($Toolbar2, $TBSTYLE_EX_DRAWDDARROWS)
Local $aText[3] = ["左对齐", @TAB & "居中", @TAB & @TAB & "右对齐"]
Local $aParts[3] = [100, 155, -1]
$StatusBar1 = _GUICtrlStatusBar_Create($Form1, $aParts, $aText)
GUICtrlSetResizing(-1, $GUI_DOCKLEFT+$GUI_DOCKRIGHT+$GUI_DOCKBOTTOM)
GUISetState()
$ImageList2 = _GUIImageList_Create(16, 16, 5)
_GUIImageList_AddIcon($ImageList2, "C:\WINDOWS\system32\SHELL32.DLL", 0, True)
_GUIImageList_AddIcon($ImageList2, "C:\WINDOWS\system32\SHELL32.DLL", 1, True)
_GUIImageList_AddIcon($ImageList2, "C:\WINDOWS\system32\SHELL32.DLL", 2, True)
_GUIImageList_AddIcon($ImageList2, "C:\WINDOWS\system32\SHELL32.DLL", 3, True)
_GUIImageList_AddIcon($ImageList2, "C:\WINDOWS\system32\SHELL32.DLL", 4, True)
_GUIImageList_AddIcon($ImageList2, "C:\WINDOWS\system32\SHELL32.DLL", 5, True)
_GUIImageList_AddIcon($ImageList2, "C:\WINDOWS\system32\SHELL32.DLL", 6, True)
_GUIImageList_AddIcon($ImageList2, "C:\WINDOWS\system32\SHELL32.DLL", 7, True)
_GUIImageList_AddIcon($ImageList2, "C:\WINDOWS\system32\SHELL32.DLL", 8, True)
_GUIImageList_AddIcon($ImageList2, "C:\WINDOWS\system32\SHELL32.DLL", 9, True)
_GUIImageList_AddIcon($ImageList2, "C:\WINDOWS\system32\SHELL32.DLL", 10, True)
_GUIImageList_AddIcon($ImageList2, "C:\WINDOWS\system32\SHELL32.DLL", 11, True)
_GUIImageList_AddIcon($ImageList2, "C:\WINDOWS\system32\SHELL32.DLL", 12, True)
_GUICtrlToolbar_SetImageList($Toolbar2, $ImageList2)
_GUICtrlToolbar_AddButtonSep($Toolbar2)
_GUICtrlToolbar_AddButton($Toolbar2, 0, 0, 0)
_GUICtrlToolbar_AddButton($Toolbar2, 0, 1, 0)
_GUICtrlToolbar_AddButtonSep($Toolbar2)
_GUICtrlToolbar_AddButton($Toolbar2, 0, 2, 0)
_GUICtrlToolbar_AddButton($Toolbar2, 0, 3, 0)
_GUICtrlToolbar_AddButton($Toolbar2, 0, 4, 0)
_GUICtrlToolbar_AddButton($Toolbar2, 0, 5, 0)
_GUICtrlToolbar_AddButton($Toolbar2, 0, 6, 0)
_GUICtrlToolbar_AddButton($Toolbar2, 0, 7, 0)
_GUICtrlToolbar_AddButton($Toolbar2, 0, 8, 0)
_GUICtrlToolbar_AddButton($Toolbar2, 0, 9, 0)
_GUICtrlToolbar_AddButtonSep($Toolbar2)
_GUICtrlToolbar_AddButton($Toolbar2, 0, 10, 0)
_GUICtrlToolbar_AddButton($Toolbar2, 0, 11, 0)
_GUICtrlToolbar_AddButton($Toolbar2, 0, 12, 0)
#EndRegion ### END Koda GUI section ###
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
EndSwitch
WEnd |
本帖子中包含更多资源
您需要 登录 才可以下载或查看,没有账号?加入
×
评分
-
查看全部评分
|