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


    สคริ๊ปตัวอักษรไหลขึ้น กับไหลลง

    avatar
    Fast
    PSsix Member Super Class III
    PSsix Member Super Class III


    สคริ๊ปตัวอักษรไหลขึ้น กับไหลลง Empty PSsix Program Coder
    จำนวนข้อความ : 217
    ความนิยม : 54
    เข้าร่วมเมื่อ : 19/06/2011

    สคริ๊ปตัวอักษรไหลขึ้น กับไหลลง Empty สคริ๊ปตัวอักษรไหลขึ้น กับไหลลง

    ตั้งหัวข้อ by Fast 19/11/11, 02:33 pm

    คลิ๊กทำตัวอักษรไหล ขึ้นกับลง คลิ๊กอีกครั้งจะหยุดนะครับ สคริ๊ปนี้ต้องกดหยุดไหลจึงจะปิดโปรแกรมได้ em218

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

     
    $Form1 = GUICreate("Form1", 321, 123, 192, 124)
    $Label1 = GUICtrlCreateLabel("ตัวอักษรไหล", 24, 16, 65, 17)
    $Button1 = GUICtrlCreateButton("ไหลขึ้น", 208, 16, 75, 25)
    $Button2 = GUICtrlCreateButton("ไหลลง", 208, 64, 75, 25)
    GUISetState(@SW_SHOW)
     

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

          Case $Button1
             GUICtrlSetData($Button1,"หยุด")
             GUICtrlSetData($label1,"    ไหลขึ้นขึ้น")
     While 1
        For $i = 1 To 123
            GUICtrlSetPos($label1, 10, 123-$i)
            Switch GUIGetMsg()
             Case $Button1
                GUICtrlSetPos($label1, 24, 16)
                    ExitLoop 2
          EndSwitch
          Sleep(10)
        Next
    WEnd
          Case $Button2
             GUICtrlSetData($Button2,"หยุด")
             GUICtrlSetData($label1,"    ไหลลงครับ")
              While 1
        For $i = 1 To 123
            GUICtrlSetPos($label1, 10, 0+$i)
            Switch GUIGetMsg()
             Case $Button2
                GUICtrlSetPos($label1, 24, 16)
                    ExitLoop 2
          EndSwitch
          Sleep(10)
        Next
    WEnd
       EndSwitch
    WEnd
    avatar
    Fast
    PSsix Member Super Class III
    PSsix Member Super Class III


    สคริ๊ปตัวอักษรไหลขึ้น กับไหลลง Empty PSsix Program Coder
    จำนวนข้อความ : 217
    ความนิยม : 54
    เข้าร่วมเมื่อ : 19/06/2011

    สคริ๊ปตัวอักษรไหลขึ้น กับไหลลง Empty Re: สคริ๊ปตัวอักษรไหลขึ้น กับไหลลง

    ตั้งหัวข้อ by Fast 20/11/11, 03:46 pm

    เพิ่มสคริ๊ปขวาไปซ้าย ซ้ายไปขวา em218


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


    $Form1 = GUICreate("Form1", 321, 123, 192, 124)
    $Label1 = GUICtrlCreateLabel("ตัวอักษรไหล", 24, 16, 65, 17)
    $Button1 = GUICtrlCreateButton("ขวาไปซ้าย", 208, 16, 75, 25)
    $Button2 = GUICtrlCreateButton("ซ้ายไปขวา", 208, 64, 75, 25)
    GUISetState(@SW_SHOW)


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

          Case $Button1
             GUICtrlSetData($Button1,"หยุด")
             GUICtrlSetData($label1,"ขวาไปซ้าย")
     While 1
        For $i = 1 To 321
            GUICtrlSetPos($label1, 321-$i,2)
            Switch GUIGetMsg()
             Case $Button1
                GUICtrlSetPos($label1, 24, 16)
                    ExitLoop 2
          EndSwitch
          Sleep(10)
        Next
    WEnd
          Case $Button2
             GUICtrlSetData($Button2,"หยุด")
             GUICtrlSetData($label1,"ซ้ายไปขวาครับ")
              While 1
        For $i = 1 To 321
            GUICtrlSetPos($label1, 0+$i, 2)
            Switch GUIGetMsg()
             Case $Button2
                GUICtrlSetPos($label1, 24, 16)
                    ExitLoop 2
          EndSwitch
          Sleep(10)
        Next
    WEnd
       EndSwitch
    WEnd

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