ฟอรั่ม PSsix

Would you like to react to this message? Create an account in a few clicks or log in to continue.

ฟอรั่มของบล็อก http://pssix.blogspot.com


2 posters

    for loop เกี่ยวกับย่อ สคริป

    avatar
    mepmep
    PSsix Member
    PSsix Member


    for loop เกี่ยวกับย่อ สคริป Empty for loop เกี่ยวกับย่อ สคริป Empty
    จำนวนข้อความ : 29
    ความนิยม : 0
    เข้าร่วมเมื่อ : 29/01/2012

    for loop เกี่ยวกับย่อ สคริป Empty for loop เกี่ยวกับย่อ สคริป

    ตั้งหัวข้อ by mepmep 25/07/13, 06:42 pm

    ถ้าเรา มี 9 checkbox จะย่อยังไงให้สั้นครับ

    Code:
    $Checkbox1 = GUICtrlCreateCheckbox("1",  16, 24, 41, 17)
    $CBox = IniRead($sIniFile,"CONFIG","Checkbox1","Not Found")
    GuictrlSetState($CheckBox1,$CBox)
    avatar
    foolsopts
    PSsix Member
    PSsix Member


    for loop เกี่ยวกับย่อ สคริป Empty
    จำนวนข้อความ : 29
    ความนิยม : 17
    เข้าร่วมเมื่อ : 24/08/2010

    for loop เกี่ยวกับย่อ สคริป Empty Re: for loop เกี่ยวกับย่อ สคริป

    ตั้งหัวข้อ by foolsopts 26/07/13, 07:35 am

    ลองศึกษาจาก code นี้นะครับ

    Code:
    #include <ComboConstants.au3>
    #include <GUIConstantsEx.au3>
    #include <WindowsConstants.au3>

    Local $Checkbox[10]

    #Region ### START Koda GUI section ### Form=
    $Form1 = GUICreate("Form1", 346, 235, 192, 124)

    $i = 0
    $vertical = 5

    Do

    $Checkbox[$i] = GUICtrlCreateCheckbox($i,5,$vertical,30,30)

    $i = $i +1

    $vertical = $vertical +25

    Until $i = 10

    GUISetState(@SW_SHOW)
    #EndRegion ### END Koda GUI section ###


    While 1
      $nMsg = GUIGetMsg()
      Switch $nMsg
          Case $GUI_EVENT_CLOSE

            Exit
      EndSwitch
    WEnd

      เวลาขณะนี้ 29/03/24, 05:40 am