ฟอรั่ม 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


3 posters

    ช่อยตอบหน่อยครับ

    tomakung
    tomakung
    PSsix Member Class II
    PSsix Member Class II


    ช่อยตอบหน่อยครับ Empty ช่อยตอบหน่อยครับ Empty
    จำนวนข้อความ : 38
    ความนิยม : 11
    เข้าร่วมเมื่อ : 24/02/2012

    ช่อยตอบหน่อยครับ Empty ช่อยตอบหน่อยครับ

    ตั้งหัวข้อ by tomakung 17/04/14, 03:03 pm

    [You must be registered and logged in to see this link.]

    จาก code ที่เอามาจากเวปหลัก เอามาทดสอบการย่อขยาย ได้แบบนี้

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

    Global $hGui, $ChkBox[1], $Msg, $WGP
    $hGui = GUICreate("", 335, 50, -1, -1)
    $ChkBox[0] = GUICtrlCreateCheckbox("ขยายขนาด GUI", 5, 5, 125, 15)
    GUICtrlSetResizing(-1, BitOr($GUI_DOCKTOP, $GUI_DOCKLEFT, $GUI_DOCKSIZE)); <- Set the resizing for the control
    GUISetState()

    While 1
        $Msg = GUIGetMsg()
        Switch $Msg
            Case $GUI_EVENT_CLOSE
                Exit
            Case $ChkBox[0]
                $WGP = WinGetPos($hGui)
                If GUICtrlRead($Msg) = $GUI_CHECKED Then
                  GUICtrlSetResizing(-1, BitOr($GUI_DOCKTOP, $GUI_DOCKLEFT, $GUI_DOCKSIZE)) ; <- Set the resizing for the control
                  WinMove($hGui, "", Default, Default, Default, $WGP[3] + 100)
                Else
                  WinMove($hGui, "", Default, Default, Default, $WGP[3] - 100)
                EndIf
        EndSwitch
    WEnd

    คำถามที่ คือ $WGP[3] ทำไมถึงต้องใช้เลข 3
    avatar
    bigcontest
    มือใหม่เพิ่งสมัคร
    มือใหม่เพิ่งสมัคร


    ช่อยตอบหน่อยครับ Empty ช่อยตอบหน่อยครับ Empty
    จำนวนข้อความ : 2
    ความนิยม : 0
    เข้าร่วมเมื่อ : 28/03/2014

    ช่อยตอบหน่อยครับ Empty Re: ช่อยตอบหน่อยครับ

    ตั้งหัวข้อ by bigcontest 17/04/14, 04:34 pm

    $WGP = WinGetPos($hGui)

    a 4-element array containing the following information:
       $aArray[0] = X position
       $aArray[1] = Y position
       $aArray[2] = Width
       $aArray[3] = Height
    tomakung
    tomakung
    PSsix Member Class II
    PSsix Member Class II


    ช่อยตอบหน่อยครับ Empty ช่อยตอบหน่อยครับ Empty
    จำนวนข้อความ : 38
    ความนิยม : 11
    เข้าร่วมเมื่อ : 24/02/2012

    ช่อยตอบหน่อยครับ Empty Re: ช่อยตอบหน่อยครับ

    ตั้งหัวข้อ by tomakung 17/04/14, 04:47 pm

    em238 
    Arm
    Arm
    PSsix Member Super Class III
    PSsix Member Super Class III


    PSsix Master PSsix Program Coder
    จำนวนข้อความ : 268
    ความนิยม : 54
    เข้าร่วมเมื่อ : 31/03/2011
    อายุ : 26

    ช่อยตอบหน่อยครับ Empty Re: ช่อยตอบหน่อยครับ

    ตั้งหัวข้อ by Arm 17/04/14, 07:35 pm

    ใช้ UDF ตัวนี้ก็ได้นะครับ (ดูหรูดี -w-)

    [You must be registered and logged in to see this link.]
    tomakung
    tomakung
    PSsix Member Class II
    PSsix Member Class II


    ช่อยตอบหน่อยครับ Empty ช่อยตอบหน่อยครับ Empty
    จำนวนข้อความ : 38
    ความนิยม : 11
    เข้าร่วมเมื่อ : 24/02/2012

    ช่อยตอบหน่อยครับ Empty Re: ช่อยตอบหน่อยครับ

    ตั้งหัวข้อ by tomakung 17/04/14, 11:26 pm

    em238 

      เวลาขณะนี้ 27/04/24, 02:01 am