本帖最后由 邪恶海盗 于 2012-9-14 18:04 编辑
#include <ListviewConstants.au3>
#Include <GuiListView.au3>
#include <GUIConstantsEx.au3>
#include <EditConstants.au3>
$WinMain = GUICreate("softname", 300, 162) ;创建主窗口
$lab1=GUICtrlCreateLabel("机器码:123456",10,12,112,18)
$lab2=GUICtrlCreateLabel("注册码:",10,30,42,18)
$key=IniRead(@ScriptDir &"\key.txt","okey","key","请输入注册码")
$input1=GUICtrlCreateInput($key,55,28,80,18)
$btn1=GUICtrlCreateButton("注册",150,28,30,18)
$List2 = GUICtrlCreateListView("12|2|123|454|jjj", 10, 54, 280, 40,$LVS_EX_GRIDLINES,$ES_CENTER)
GUICtrlSetFont(-1, 12, 500, 0, "", 18)
$btn2=GUICtrlCreateButton("写入数据",80,128,70,18)
GUISetState(@SW_SHOW)
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
;DirRemove($Temp, 1)
Exit
Case $btn1
IniWrite(@ScriptDir&"\key.txt","okey","key",GUICtrlRead($input1))
Case $btn2
$item=GUICtrlCreateListViewItem("1|2|3|4|4",$List2)
EndSwitch
WEnd
目的1:注册码不正确的时候锁定按钮...
目的2:listviewitem高度怎么调??? |