本帖最后由 xms77 于 2012-3-26 12:15 编辑
回复 3# zxxputian6
上面的软件界面是用Delphi编写的,没有源码,我想用AU3来实现,界面差不多完成了,就是界面的细节,比如listview的列冻结还没有找到方法来实现。AU3代码如下,供参考
#include <ButtonConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <ListViewConstants.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
#Region ### START Koda GUI section ### Form=E:\autoit3\my program\Gramload program\GUI\Testing Data.kxf
$Form1 = GUICreate("Child_Form", 480, 320, 192, 124)
$Label1 = GUICtrlCreateLabel("Model", 8, 10, 33, 17)
$Label2 = GUICtrlCreateLabel("O/P#", 8, 35, 31, 17)
$Input_EN = GUICtrlCreateInput("", 48, 99, 105, 21, BitOR($GUI_SS_DEFAULT_INPUT,$WS_BORDER))
GUICtrlSetState(-1, $GUI_DISABLE)
$Input_SBR = GUICtrlCreateInput("", 48, 118, 105, 21, BitOR($GUI_SS_DEFAULT_INPUT,$WS_BORDER))
GUICtrlSetState(-1, $GUI_DISABLE)
$Input_Fix = GUICtrlCreateInput("", 48, 140, 105, 21, BitOR($GUI_SS_DEFAULT_INPUT,$WS_BORDER))
GUICtrlSetState(-1, $GUI_DISABLE)
$Input_TMode = GUICtrlCreateInput("", 48, 162, 105, 21, BitOR($GUI_SS_DEFAULT_INPUT,$WS_BORDER))
GUICtrlSetState(-1, $GUI_DISABLE)
$Input_SN = GUICtrlCreateInput("", 48, 184, 105, 21, BitOR($GUI_SS_DEFAULT_INPUT,$WS_BORDER))
$Input1 = GUICtrlCreateInput("", 48, 230, 401, 21, BitOR($GUI_SS_DEFAULT_INPUT,$WS_BORDER))
GUICtrlSetState(-1, $GUI_DISABLE)
$Label3 = GUICtrlCreateLabel("Cell#", 8, 57, 28, 17)
$Label4 = GUICtrlCreateLabel("M/C#", 8, 79, 32, 17)
$Label5 = GUICtrlCreateLabel("E/N", 8, 102, 24, 17)
$Label6 = GUICtrlCreateLabel("SBR#", 8, 122, 33, 17)
$Label7 = GUICtrlCreateLabel("Fix#", 8, 144, 24, 17)
$Label8 = GUICtrlCreateLabel("TMode", 7, 166, 38, 17)
$Label9 = GUICtrlCreateLabel("S/N", 8, 188, 24, 17)
$Label10 = GUICtrlCreateLabel("Mode", 8, 211, 31, 17)
$Label11 = GUICtrlCreateLabel("Txt Dir", 6, 233, 43, 17)
$Label12 = GUICtrlCreateLabel("Previous NPQ Path", 8, 256, 104, 17)
$Input2 = GUICtrlCreateInput("No Process Qualification", 111, 251, 337, 21, BitOR($GUI_SS_DEFAULT_INPUT,$WS_BORDER))
$Input3 = GUICtrlCreateInput("No Process Qualification", 111, 272, 337, 21, BitOR($GUI_SS_DEFAULT_INPUT,$WS_BORDER))
$Label13 = GUICtrlCreateLabel("NPQ Path", 8, 275, 84, 17)
$Label14 = GUICtrlCreateLabel("Status", 8, 298, 42, 17)
$ListView_data = GUICtrlCreateListView("|Last1|Last2|Last3|3Range|3Avg|N Total|N Fail|Yield|CPK|Mean|Std.|Min.|Max.", 156, 6, 241, 217, BitOR($GUI_SS_DEFAULT_LISTVIEW,$WS_HSCROLL), BitOR($WS_EX_CLIENTEDGE,$LVS_EX_GRIDLINES))
GUICtrlSendMsg(-1, $LVM_SETCOLUMNWIDTH, 0, 50)
GUICtrlSendMsg(-1, $LVM_SETCOLUMNWIDTH, 1, 60)
GUICtrlSendMsg(-1, $LVM_SETCOLUMNWIDTH, 2, 60)
GUICtrlSendMsg(-1, $LVM_SETCOLUMNWIDTH, 3, 60)
GUICtrlSendMsg(-1, $LVM_SETCOLUMNWIDTH, 4, 60)
GUICtrlSendMsg(-1, $LVM_SETCOLUMNWIDTH, 5, 60)
GUICtrlSendMsg(-1, $LVM_SETCOLUMNWIDTH, 6, 60)
GUICtrlSendMsg(-1, $LVM_SETCOLUMNWIDTH, 7, 60)
GUICtrlSendMsg(-1, $LVM_SETCOLUMNWIDTH, 8, 60)
GUICtrlSendMsg(-1, $LVM_SETCOLUMNWIDTH, 9, 60)
GUICtrlSendMsg(-1, $LVM_SETCOLUMNWIDTH, 10, 60)
GUICtrlSendMsg(-1, $LVM_SETCOLUMNWIDTH, 11, 60)
GUICtrlSendMsg(-1, $LVM_SETCOLUMNWIDTH, 12, 60)
GUICtrlSendMsg(-1, $LVM_SETCOLUMNWIDTH, 13, 60)
$ListView_data_0 = GUICtrlCreateListViewItem("Result", $ListView_data)
$Pic_Status = GUICtrlCreatePic("E:\autoit3\my program\图标库\Ready.bmp", 408, 8, 65, 65)
$Btn_Test = GUICtrlCreateButton("Test", 408, 80, 65, 25, BitOR($BS_CENTER,$BS_VCENTER))
$Btn_Retest = GUICtrlCreateButton("Retest", 408, 109, 65, 25)
GUICtrlSetState(-1, $GUI_DISABLE)
$Btn_Cancel = GUICtrlCreateButton("Cancel", 409, 137, 64, 24)
$Lbl_Second = GUICtrlCreateLabel("0.0", 411, 165, 41, 16, $SS_CENTER, $WS_EX_CLIENTEDGE)
GUICtrlSetFont(-1, 10, 800, 0, "Small Fonts")
$Label15 = GUICtrlCreateLabel("Sec.", 450, 166, 26, 17)
$Label16 = GUICtrlCreateLabel("NWK. OK", 408, 200, 59, 20, -1, $WS_EX_CLIENTEDGE)
GUICtrlSetFont(-1, 10, 400, 0, "MS Sans Serif")
GUICtrlSetColor(-1, 0x0000FF)
$Lbl_Stauts = GUICtrlCreateLabel("Put the Serial Number!", 48, 297, 426, 17, $SS_CENTER, $WS_EX_CLIENTEDGE)
$Pic_PathStauts = GUICtrlCreatePic("E:\autoit3\my program\图标库\Green Lamp.bmp", 454, 232, 17, 17)
$Pic1 = GUICtrlCreatePic("E:\autoit3\my program\图标库\Grey Lamp.bmp", 454, 252, 17, 17)
$Pic2 = GUICtrlCreatePic("E:\autoit3\my program\图标库\Grey Lamp.bmp", 454, 272, 17, 17)
$Lbl_Mode = GUICtrlCreateLabel("", 48, 206, 106, 25, BitOR($SS_RIGHT,$WS_BORDER), $WS_EX_CLIENTEDGE)
GUICtrlSetFont(-1, 10, 400, 0, "MS Sans Serif")
$Lbl_MC = GUICtrlCreateLabel("", 48, 74, 106, 25, BitOR($SS_RIGHT,$WS_BORDER), $WS_EX_CLIENTEDGE)
GUICtrlSetFont(-1, 10, 400, 0, "MS Sans Serif")
$Lbl_Cell = GUICtrlCreateLabel("", 48, 51, 106, 25, BitOR($SS_RIGHT,$WS_BORDER), $WS_EX_CLIENTEDGE)
GUICtrlSetFont(-1, 10, 400, 0, "MS Sans Serif")
$Lbl_OP = GUICtrlCreateLabel("", 48, 27, 106, 25, BitOR($SS_RIGHT,$WS_BORDER), $WS_EX_CLIENTEDGE)
GUICtrlSetFont(-1, 10, 400, 0, "MS Sans Serif")
$Label17 = GUICtrlCreateLabel("Venus_4HD", 48, 4, 106, 25, BitOR($SS_RIGHT,$WS_BORDER), $WS_EX_CLIENTEDGE)
GUICtrlSetFont(-1, 10, 400, 0, "MS Sans Serif")
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
EndSwitch
WEnd
|