chzj589
发表于 2018-3-12 13:32:13
回复 13# qsy666888
加油!继续努力!
heroxianf
发表于 2018-3-12 13:53:39
用AU3 估计界面部分代码量就很大了。
chzj589
发表于 2018-3-12 13:58:55
回复 15# qsy666888
获取日期
#include <DateTimeConstants.au3>
#include <GUIConstantsEx.au3>
#include <MsgBoxConstants.au3>
Example()
Func Example()
GUICreate("获取日期", 300, 200, 800, 200)
Local $idDate = GUICtrlCreateDate("", 151, 10, 20, 25, $DTS_SHORTDATEFORMAT)
Local $Input1 = GUICtrlCreateInput("", 10, 10, 140, 25)
GUICtrlSetFont(-1, 12, 400, 0, "Arial")
GUICtrlSetColor(-1, 0x990000)
GUISetState(@SW_SHOW)
; 循环到用户退出.
While 1
Switch GUIGetMsg()
Case $GUI_EVENT_CLOSE
ExitLoop
Case $idDate
GUICtrlSetData($Input1, GUICtrlRead($idDate))
EndSwitch
WEnd
GUIDelete()
EndFunc ;==>Example
blbl
发表于 2018-3-13 00:06:31
这个工作量大的去了 累死了
fenhanxue
发表于 2018-3-13 00:50:03
我觉得写是肯定能写的,就是工程量很费时间罢了,所涉及到基本上都是基础的语法,即使新手,翻翻帮助加搜搜论坛,也肯定可以搞定。就是太费时间
chzj589
发表于 2018-3-13 10:44:45
回复 13# qsy666888
qsy666888
发表于 2018-3-13 13:50:21
回复 21# chzj589
有点雷同,能否把代码发来让我参照一下
cfanpc
发表于 2018-3-13 13:53:37
IS软件就是AU3写的,功能也很厉害
qsy666888
发表于 2018-3-13 13:54:30
本帖最后由 qsy666888 于 2018-3-13 13:57 编辑
发这个管理软件的一个复选框,共享#include <ButtonConstants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#Include <Constants.au3 >
#Include <WinAPIEx.au3>
Dim $text
#Region ### START Koda GUI section ### Form=
Global $Form1 = GUICreate("Form1", 200, 178, -1, -1, BitOR($WS_SYSMENU, $WS_POPUP,$WS_SIZEBOX))
GUISetBkColor(0xF4F7FC)
Global $Group1 = GUICtrlCreateGroup("", 5, 0, 189, 148)
Global $Checkbox1 = GUICtrlCreateCheckbox("全选", 16, 8, 97, 17)
Global $Checkbox2 = GUICtrlCreateCheckbox("居住", 16, 28, 97, 17)
Global $Checkbox3 = GUICtrlCreateCheckbox("商业", 16, 48, 97, 17)
Global $Checkbox4 = GUICtrlCreateCheckbox("公共", 16, 68, 97, 17)
Global $Checkbox5 = GUICtrlCreateCheckbox("交通", 16, 88, 97, 17)
Global $Checkbox6 = GUICtrlCreateCheckbox("工业", 16, 108, 97, 17)
Global $Checkbox7 = GUICtrlCreateCheckbox("其它", 16, 128, 97, 17)
Global $Button1 = GUICtrlCreateButton("确定", 54, 150, 60, 23)
Global $Button2 = GUICtrlCreateButton("退出", 126, 150, 60, 23)
GUICtrlCreateGroup("", -99, -99, 1, 1)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $Button2
Exit
;Case $GUI_EVENT_PRIMARYDOWN
;_SendMessage($Form1, $WM_SYSCOMMAND, $SC_MOVE + $HTCAPTION, 0)
Case $Checkbox1
If BitAND(GUICtrlRead($Checkbox1), $GUI_CHECKED) Then
GUICtrlSetState($Checkbox2, $gui_checked)
GUICtrlSetState($Checkbox3, $gui_checked)
GUICtrlSetState($Checkbox4, $gui_checked)
GUICtrlSetState($Checkbox5, $gui_checked)
GUICtrlSetState($Checkbox6, $gui_checked)
GUICtrlSetState($Checkbox7, $gui_checked)
$text = ' 居住 商业 公共 交通 工业 其它'
Else
GUICtrlSetState($Checkbox2, $gui_unchecked)
GUICtrlSetState($Checkbox3, $gui_unchecked)
GUICtrlSetState($Checkbox4, $gui_unchecked)
GUICtrlSetState($Checkbox5, $gui_unchecked)
GUICtrlSetState($Checkbox6, $gui_unchecked)
GUICtrlSetState($Checkbox7, $gui_unchecked)
$text = ''
EndIf
Case $Checkbox2
If BitAND(GUICtrlRead($Checkbox2), $GUI_CHECKED) Then
$text0 = '居住'
$text = $text&' '&$text0
Else
$text = StringReplace($text, " 居住", "")
EndIf
Case $Checkbox3
If BitAND(GUICtrlRead($Checkbox3), $GUI_CHECKED) Then
$text0 = '商业'
$text = $text&' '&$text0
Else
$text = StringReplace($text, " 商业", "")
EndIf
Case $Checkbox4
If BitAND(GUICtrlRead($Checkbox4), $GUI_CHECKED) Then
$text0 = '公共'
$text = $text&' '&$text0
Else
$text = StringReplace($text, " 公共", "")
EndIf
Case $Checkbox5
If BitAND(GUICtrlRead($Checkbox5), $GUI_CHECKED) Then
$text0 = '交通'
$text = $text&' '&$text0
Else
$text = StringReplace($text, " 交通", "")
EndIf
Case $Checkbox6
If BitAND(GUICtrlRead($Checkbox6), $GUI_CHECKED) Then
$text0 = '工业'
$text = $text&' '&$text0
Else
$text = StringReplace($text, " 工业", "")
EndIf
Case $Checkbox7
If BitAND(GUICtrlRead($Checkbox7), $GUI_CHECKED) Then
$text0 = '其它'
$text = $text&' '&$text0
Else
$text = StringReplace($text, " 其它", "")
EndIf
Case $Button1
MsgBox(0,'',$text)
EndSwitch
WEnd
chzj589
发表于 2018-3-13 14:29:55
回复 22# qsy666888
#AutoIt3Wrapper_icon=line.ico; zzsy.ico; C:\WINDOWS\system32\SHELL32.dll|-39.ico
#AutoIt3Wrapper_OutFile= 窗口模式v1.0.exe ;输出文件名
#AutoIt3Wrapper_Res_LegalCopyright=Copyright (c) chzj589 20180214
#AutoIt3Wrapper_OutFile_Type=exe ;文件类型
#AutoIt3Wrapper_UseX64 = n
#AutoIt3Wrapper_Compression=4 ;压缩等级
#AutoIt3Wrapper_UseUPX=y
#AutoIt3Wrapper_Res_Comment= 窗口模式 ;注释
#AutoIt3Wrapper_Res_Description=窗口模式 ;详细信息
#AutoIt3Wrapper_Res_FileVersion=1.0.0.0
#AutoIt3Wrapper_Res_Field=ProductName|窗口模式程序--win7-64-3.3.14.2;产品说明
#AutoIt3Wrapper_Res_Field=OriginalFilename|窗口模式.au3
#AutoIt3Wrapper_Res_Language=2052
#include <GUIConstantsEx.au3>
#include <ButtonConstants.au3>
#include <EditConstants.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
#include <GuiListView.au3>
#include <GuiImageList.au3>
#include <ListViewConstants.au3>
#include <GuiTreeView.au3>
#include <TreeViewConstants.au3>
#include <TabConstants.au3>
#include <GuiTab.au3>
#include <String.au3>
#include <TrayConstants.au3>
;#NoTrayIcon
Opt("GUIOnEventMode", 1)
Global $iWidtha = @DesktopWidth
Global $iHeighta = @DesktopHeight
Global Const $Turquoise = 0xccccAA
Global Const $Crimson = 0x0000FF
Global $Groupb, $Groupb1, $yeListView1, $TreeView, $TreeView1, $MyGui
Global $iHeight = 20
GUIa()
While 1
Sleep(1000)
WEnd
Func GUIa()
$MyGui = GUICreate("窗口模式", $iWidtha - 48, $iHeighta - 80, -1, -1, $WS_OVERLAPPEDWINDOW)
GUISetOnEvent($GUI_EVENT_CLOSE, "hMainClose")
GUISetBkColor(0xA0E0E0)
$menu1 = GUICtrlCreateMenu("管 理[&L]")
$MenuItem1 = GUICtrlCreateMenuItem("首 页", $menu1, 1, 1)
;GUICtrlSetOnEvent($MenuItem1, "CreateAA")
;GUICtrlSetState(-1, 512)
$MenuItem2 = GUICtrlCreateMenuItem("销售区域", $menu1, 1, 1)
;GUICtrlSetOnEvent($MenuItem2, "CreateChildf1")
$MenuItem3 = GUICtrlCreateMenuItem("销售月份", $menu1, 1, 1)
;GUICtrlSetOnEvent($MenuItem3, "CreateChildf3")
$MenuItem4 = GUICtrlCreateMenuItem("销售业绩", $menu1, 1, 1)
;GUICtrlSetOnEvent($MenuItem4, "CreateChildf2")
GUICtrlCreateMenuItem("", $menu1)
$MenuItem5 = GUICtrlCreateMenuItem("关闭(&C)", $menu1)
GUICtrlSetOnEvent($MenuItem5, "hMainClose")
;#ce
$menu2 = GUICtrlCreateMenu("导入管理[&E]")
$MenuItema1 = GUICtrlCreateMenuItem("修改登录密码", $menu2)
;GUICtrlSetOnEvent($MenuItema1, "_login_okc")
$MenuItema2 = GUICtrlCreateMenuItem("销售业绩饼图", $menu2)
;GUICtrlSetOnEvent($MenuItema2, "_CreateAA1D")
$MenuItema3 = GUICtrlCreateMenuItem("3D叠橫条销售业绩图", $menu2)
;GUICtrlSetOnEvent($MenuItema3, "_CreateAAB3D")
$MenuItema4 = GUICtrlCreateMenuItem("销售月份图", $menu2)
;GUICtrlSetOnEvent($MenuItema4, "_3DExample1")
GUICtrlCreateMenuItem("", $menu2)
;GUICtrlCreateMenuItem("", $menu2)
$MenuItema5 = GUICtrlCreateMenuItem("导入Excel", $menu2)
;GUICtrlSetOnEvent($MenuItema5, "CreateChildaw")
$MenuItema6 = GUICtrlCreateMenuItem("整理数据", $menu2)
;GUICtrlSetOnEvent($MenuItema6, "_3DExample2DU");_Iniduxiea")
$Group1 = GUICtrlCreateGroup("", 10, 5, 350, 95)
GUICtrlCreateLabel("1", 359, 14, 6, 86)
GUICtrlSetBkColor(-1, 0xfbfcfd)
GUICtrlSetColor(-1, 0xfbfcfd);0x009900)
GUICtrlSetFont(-1, 12, 600, 0, 'Verdana')
$Group2 = GUICtrlCreateGroup("", 365, 5, 350, 95)
GUICtrlCreateLabel("1", 713, 14, 6, 86)
GUICtrlSetBkColor(-1, 0xfbfcfd)
GUICtrlSetColor(-1, 0xfbfcfd);0x009900)
GUICtrlSetFont(-1, 12, 600, 0, 'Verdana')
$Group3 = GUICtrlCreateGroup("", 719, 5, 350, 95)
$TreeView = GUICtrlCreateTreeView(10, 105, 210, $iHeighta - 283, BitOR($TVS_HASBUTTONS, $TVS_HASLINES, $TVS_LINESATROOT, $TVS_DISABLEDRAGDROP, $TVS_SHOWSELALWAYS), $WS_EX_CLIENTEDGE)
GUICtrlSetCursor($TreeView, "SIZEALL");鼠标指针
GUICtrlSetTip($TreeView, "选择文件左鍵单击打开")
;_GUICtrlTreeView_SetBkColor($TreeView, $Turquoise)
_GUICtrlTreeView_SetTextColor($TreeView, $Crimson)
_GUICtrlTreeView_SetLineColor($TreeView, 0x0000ff);$COLOR_WHITE)
_GUICtrlTreeView_SetBold($TreeView, $Groupb)
$TreeView1 = GUICtrlCreateTreeView($iWidtha - 545 + 230, 105, 250, $iHeighta - 283, BitOR($TVS_HASBUTTONS, $TVS_HASLINES, $TVS_LINESATROOT, $TVS_DISABLEDRAGDROP, $TVS_SHOWSELALWAYS), $WS_EX_CLIENTEDGE)
GUICtrlSetCursor($TreeView1, "SIZEALL");鼠标指针
GUICtrlSetTip($TreeView1, "选择文件左鍵单击打开")
_GUICtrlTreeView_SetTextColor($TreeView1, $Crimson)
_GUICtrlTreeView_SetLineColor($TreeView1, 0x0000ff);$COLOR_WHITE)
_GUICtrlTreeView_SetBold($TreeView1, $Groupb1)
Local $hImage = _GUIImageList_Create(16, 16, 5, 3)
_GUIImageList_AddIcon($hImage, 'shell32.dll', 110)
_GUIImageList_AddIcon($hImage, 'shell32.dll', 131)
_GUIImageList_AddIcon($hImage, 'shell32.dll', 165)
_GUIImageList_AddIcon($hImage, 'shell32.dll', 168)
_GUIImageList_AddIcon($hImage, 'shell32.dll', 137)
_GUIImageList_AddIcon($hImage, 'shell32.dll', 146)
_GUIImageList_AddIcon($hImage, 'shell32.dll', 4)
_GUIImageList_AddIcon($hImage, 'shell32.dll', 45)
_GUIImageList_AddIcon($hImage, 'shell32.dll', 39)
_GUIImageList_AddIcon($hImage, 'shell32.dll', 40)
_GUICtrlTreeView_SetNormalImageList($TreeView, $hImage)
_GUICtrlTreeView_SetNormalImageList($TreeView1, $hImage)
$hImagea = _GUIImageList_Create(1, 22);30为每行的间距(即网格高度)
_GUICtrlListView_SetImageList($yeListView1, $hImagea, 1)
_GUICtrlListView_SetImageList($yeListView1, $hImage, 1)
$Groupb = _GUICtrlTreeView_Add($TreeView, 0, "区域", 0, 0)
_GUICtrlTreeView_SetIcon($TreeView, $Groupb, 'shell32.dll', 45)
_GUICtrlTreeView_Expand($TreeView, $Groupb)
;_TreeViewdu21();读取数据库显示TreeView
_GUICtrlTreeView_Expand($TreeView1, $Groupb1)
;_GUICtrlTreeView_SelectItemByIndex($TreeView1, $Groupb1, 0)
$Groupb1 = _GUICtrlTreeView_Add($TreeView1, 0, "月份", 0, 0)
_GUICtrlTreeView_SetIcon($TreeView1, $Groupb1, 'shell32.dll', 39)
_GUICtrlTreeView_SelectItemByIndex($TreeView, $Groupb, 0)
_GUICtrlTreeView_SelectItemByIndex($TreeView1, $Groupb1, 0)
;_TreeViewdu23();读取数据库显示TreeView1
$GListView1 = GUICtrlCreateListView("", 225, 105, $iWidtha - 545, $iHeighta - 283, $LVS_REPORT, $WS_EX_CLIENTEDGE);, -1, BitOR($WS_EX_CLIENTEDGE, $LVS_EX_FULLROWSELECT, $LVS_REPORT))
$hGListView1 = GUICtrlGetHandle($GListView1)
;GUICtrlSetColor($GListView1, 0x0055ff);设置指定控件的文本颜色
;GUICtrlSetBkColor(-1, $CLR_MONEYGREEN);0xC0C0C0); 背景色
GUICtrlSetFont(-1, 10, 400, 0, "微软雅黑")
GUICtrlSetTip(-1, "显示过渡费管理")
; 设置颜色
_GUICtrlListView_SetBkColor($GListView1, 14675183);$CLR_MONEYGREEN)
_GUICtrlListView_AddColumn($GListView1, "ID", $iWidtha / 24, 2);设置列属性
_GUICtrlListView_AddColumn($GListView1, "日期", $iWidtha / 12, 2)
_GUICtrlListView_AddColumn($GListView1, "省份", $iWidtha / 24, 2)
_GUICtrlListView_AddColumn($GListView1, "销售区域", $iWidtha / 18, 2)
_GUICtrlListView_AddColumn($GListView1, "单位名称", $iWidtha / 6, 2)
_GUICtrlListView_AddColumn($GListView1, "客户", $iWidtha / 12, 2)
_GUICtrlListView_AddColumn($GListView1, "费用科目", $iWidtha / 12, 2)
_GUICtrlListView_AddColumn($GListView1, "金额", $iWidtha / 12, 2)
_GUICtrlListView_AddColumn($GListView1, "经办人", $iWidtha / 16, 2)
_GUICtrlListView_AddColumn($GListView1, "业务经理", $iWidtha / 16, 2)
_GUICtrlListView_AddColumn($GListView1, "备注", $iWidtha / 10, 2)
_GUICtrlListView_AddColumn($GListView1, "区域月份", $iWidtha / 12, 2)
_GUICtrlListView_RegisterSortCallBack($GListView1)
_GUICtrlListView_SortItems($GListView1, 0);以ID排序
$hImage = _GUIImageList_Create(1, $iHeight)
_GUICtrlListView_SetImageList($hGListView1, $hImage, 1)
_GUICtrlListView_SetExtendedListViewStyle($GListView1, BitOR($LVS_EX_GRIDLINES, $LVS_EX_FULLROWSELECT, $LVS_EX_INFOTIP))
$GInputuk7 = GUICtrlCreateLabel("", 1510, $iHeighta - 168, 60, 20)
GUICtrlSetColor(-1, 0x009900);0xCBAC00)
GUICtrlSetFont(-1, 11, 400, 0, "微软雅黑")
;GUICtrlSetState($GInputuk7, $GUI_HIDE)
$EButton3 = GUICtrlCreateButton("返回首页", 30, $iHeighta - 168, 80, 22)
;GUICtrlSetOnEvent($EButton3, "_utton32a")
$EButton1 = GUICtrlCreateButton("<", 110, $iHeighta - 168, 30, 22)
;GUICtrlSetOnEvent($EButton1, "_utton12a")
;read2a(1)
$EButton2 = GUICtrlCreateButton(">", 207, $iHeighta - 168, 30, 22)
;GUICtrlSetOnEvent($EButton2, "_utton22a")
$EButton4 = GUICtrlCreateButton("跳至尾页", 237, $iHeighta - 168, 80, 22)
;GUICtrlSetOnEvent($EButton4, "_utton42a")
$Button4 = GUICtrlCreateButton("读取数据", 360, $iHeighta - 168, 100, 22, 0)
;GUICtrlSetOnEvent(-1, "_login_okc")
GUISetState(@SW_SHOW, $MyGui)
EndFunc ;==>GUIa
Func hMainClose()
GUIDelete()
Exit
EndFunc ;==>hMainClose
heroxianf
发表于 2018-3-13 14:33:57
回复 25# chzj589
感觉里你平时工作总是和界面打交道啊,什么风格的都有。
chzj589
发表于 2018-3-13 14:44:13
回复 26# heroxianf
只是拿现有的代码改的,没上数据库,
列表与树视图无法显示。
heroxianf
发表于 2018-3-13 15:05:18
回复 27# chzj589
大体可以看到后边的功能了,我现在做的貌似还用不到这些列表数什么的 ,一直没去看这类的帮助{:face (197):}
35888894
发表于 2018-3-14 13:34:18
AU3写这个毫无压力。。。
qsy666888
发表于 2018-3-14 18:13:26
先把框框弄起了再往里面写