ถ้าเกิดเราสร้าง ช่องeditว่างๆขึ้นมาสัก5ช่อง แล้วผมอยากทำปุ่ม button พอกดแล้วให้เซฟคำที่เราำมลงในช่องeditให้เวลืาเราเปิดโปรแกรมมาฬหม่แล้วคำที่เราใสส่นั้นยังอยู่ต้องทำยังไงหรอคับ รบกวนแนะนำหน่อยครับ
2 posters
รบกวนถามผู้รู้หน่อยครับ
soziie- PSsix Member Class II
จำนวนข้อความ : 37
ความนิยม : 1
เข้าร่วมเมื่อ : 10/12/2011
- Post n°1
รบกวนถามผู้รู้หน่อยครับ
POS- PSsix
-
จำนวนข้อความ : 1152
ความนิยม : 326
เข้าร่วมเมื่อ : 19/07/2010
- Post n°2
Re: รบกวนถามผู้รู้หน่อยครับ
- Code:
#include <ButtonConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("Form1", 401, 461, 192, 124)
$Edit1 = GUICtrlCreateEdit( "", 32, 16, 265, 73, BitOR($ES_AUTOVSCROLL,$ES_AUTOHSCROLL,$ES_WANTRETURN))
GUICtrlSetData(-1, IniRead("pssix.ini", "ps", "1", ""))
$Edit2 = GUICtrlCreateEdit( "", 32, 104, 265, 73, BitOR($ES_AUTOVSCROLL,$ES_AUTOHSCROLL,$ES_WANTRETURN))
GUICtrlSetData(-1, IniRead("pssix.ini", "ps", "2", ""))
$Edit3 = GUICtrlCreateEdit( "", 32, 192, 265, 73, BitOR($ES_AUTOVSCROLL,$ES_AUTOHSCROLL,$ES_WANTRETURN))
GUICtrlSetData(-1, IniRead("pssix.ini", "ps", "3", ""))
$Edit4 = GUICtrlCreateEdit( "", 32, 280, 265, 73, BitOR($ES_AUTOVSCROLL,$ES_AUTOHSCROLL,$ES_WANTRETURN))
GUICtrlSetData(-1, IniRead("pssix.ini", "ps", "4", ""))
$Edit5 = GUICtrlCreateEdit( "", 32, 368, 265, 73, BitOR($ES_AUTOVSCROLL,$ES_AUTOHSCROLL,$ES_WANTRETURN))
GUICtrlSetData(-1, IniRead("pssix.ini", "ps", "5", ""))
$Button1 = GUICtrlCreateButton("Button1", 304, 32, 75, 25)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
Case $Button1
IniWrite("pssix.ini", "ps", "1", GUICtrlRead($Edit1))
IniWrite("pssix.ini", "ps", "2", GUICtrlRead($Edit2))
IniWrite("pssix.ini", "ps", "3", GUICtrlRead($Edit3))
IniWrite("pssix.ini", "ps", "4", GUICtrlRead($Edit4))
IniWrite("pssix.ini", "ps", "5", GUICtrlRead($Edit5))
EndSwitch
WEnd
|
|