本帖最后由 半芯竹 于 2012-1-27 21:16 编辑 $mygui=GUICreate('EDIE',400,100,0,0)
$A1 = GUICtrlCreateInput("12345",5,5,160,23)
$A2 = GUICtrlCreateInput("123",5,30,50,23)
For $i = $A1 to $A2
GUICtrlSetFont($i,12)
Next
Global $1But= GUICtrlCreateButton("存 檔",200,4,38,26)
Global $2But= GUICtrlCreateButton("讀 檔",200,30,38,26)
GUISetState()
While 1
$msg = GUIGetMsg()
Switch $msg
Case -3
Exit
Case $1But
$data1=GUICtrlRead ($A1)
$var1 = FileSaveDialog( "输入一个文件名", @DesktopDir, "配置文件 (*.ini)", 2+16,'config.ini',$mygui)
If Not @error Then
IniWrite ( $var1, "", "",$data1)
EndIf
Case $2But
$var2 = FileOpenDialog('请选择一个INI文件' , @DesktopDir, "配置文件 (*.ini)", 1,'config.ini',$mygui )
If not @error Then
$data2=IniRead($var2,'','','')
GUICtrlSetData($a2,$data2)
EndIf
EndSwitch
WEnd
|