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


5 posters

    อยากเปลี่ยนรูปแบบ Progress Bar ทำได้ไหมครับ

    Quixotic
    Quixotic
    PSsix Member High Class
    PSsix Member High Class


    PSsix Program Coder
    จำนวนข้อความ : 91
    ความนิยม : 1
    เข้าร่วมเมื่อ : 29/03/2011

    อยากเปลี่ยนรูปแบบ Progress Bar ทำได้ไหมครับ Empty อยากเปลี่ยนรูปแบบ Progress Bar ทำได้ไหมครับ

    ตั้งหัวข้อ by Quixotic 14/01/12, 11:32 pm

    ขอไม่บ่นไรมากนะครับ คือว่าอยากได้ progress bar แบบในรูป
    อยากเปลี่ยนรูปแบบ Progress Bar ทำได้ไหมครับ Capprog



    ต้องทำยังไงหรอครับ หาข้อมูลไม่เจออ่ะครับ em229

    เจอแต่ AutoIT Xskin แต่ผมอยากทำแบบที่เรากำหนดสีกำหนดหน้าตาต่างๆมันได้อ่ะครับ
    avatar
    pureexe
    PSsix Member High Class
    PSsix Member High Class


    อยากเปลี่ยนรูปแบบ Progress Bar ทำได้ไหมครับ Empty
    จำนวนข้อความ : 73
    ความนิยม : 8
    เข้าร่วมเมื่อ : 27/04/2011

    อยากเปลี่ยนรูปแบบ Progress Bar ทำได้ไหมครับ Empty Re: อยากเปลี่ยนรูปแบบ Progress Bar ทำได้ไหมครับ

    ตั้งหัวข้อ by pureexe 16/01/12, 01:22 pm

    เอาทางที่ยากที่สุดเ้ลยคือแก้shell32.dll แล้าเอามาทับ
    ง่ายกว่านั้นหน่อยคือสร้างรูปprocess bar ไว้สองอัน (ว่างเปล่ากับเต็มแล้ว)แล้วเขียนให้อันที่เต็มแล้วมันขยายขึ้นไปเรื่อย (ทำสคริบสักครู่)
    avatar
    pureexe
    PSsix Member High Class
    PSsix Member High Class


    อยากเปลี่ยนรูปแบบ Progress Bar ทำได้ไหมครับ Empty
    จำนวนข้อความ : 73
    ความนิยม : 8
    เข้าร่วมเมื่อ : 27/04/2011

    อยากเปลี่ยนรูปแบบ Progress Bar ทำได้ไหมครับ Empty Re: อยากเปลี่ยนรูปแบบ Progress Bar ทำได้ไหมครับ

    ตั้งหัวข้อ by pureexe 16/01/12, 01:44 pm

    กระตุกหน่อยแต่ย่างนี้ใช่ไหม?
    [You must be registered and logged in to see this link.]

    อ่อนี่code


    #include
    #include
    #include
    #Region ### START Koda GUI section ### Form=
    $Form1 = GUICreate("Form1", 623, 61, 192, 124)
    $Pic1 = GUICtrlCreatePic("process01.JPG", 24, 16, 600,17)
    $Pic2 = GUICtrlCreatePic("process02.JPG", 24, 16, 0, 17)
    GUISetState(@SW_SHOW)
    #EndRegion ### END Koda GUI section ###
    Sleep(1000)
    for $i=1 to 100
    $Pic2 = GUICtrlCreatePic("process02.JPG", 24, 16, $i*6, 17)
    GUISetState(@SW_HIDE,$Form1)
    GUISetState(@SW_SHOW,$Form1)
    Sleep(100)
    Next

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

    EndSwitch
    WEnd
    max30012540
    max30012540
    PSsix Member High Class
    PSsix Member High Class


    อยากเปลี่ยนรูปแบบ Progress Bar ทำได้ไหมครับ Empty PSsix Program Coder
    จำนวนข้อความ : 98
    ความนิยม : 10
    เข้าร่วมเมื่อ : 10/10/2011
    อายุ : 26

    อยากเปลี่ยนรูปแบบ Progress Bar ทำได้ไหมครับ Empty Re: อยากเปลี่ยนรูปแบบ Progress Bar ทำได้ไหมครับ

    ตั้งหัวข้อ by max30012540 16/01/12, 03:21 pm

    ถ้าเปลี่ยนสีอย่างเดียวลองดูลิ้งข้างล่างครับ
    [You must be registered and logged in to see this link.]
    Quixotic
    Quixotic
    PSsix Member High Class
    PSsix Member High Class


    PSsix Program Coder
    จำนวนข้อความ : 91
    ความนิยม : 1
    เข้าร่วมเมื่อ : 29/03/2011

    อยากเปลี่ยนรูปแบบ Progress Bar ทำได้ไหมครับ Empty Re: อยากเปลี่ยนรูปแบบ Progress Bar ทำได้ไหมครับ

    ตั้งหัวข้อ by Quixotic 16/01/12, 06:19 pm

    จะเปลี่ยนสกินมันเลยอ่า แบบในรูป T_T
    avatar
    Fast
    PSsix Member Super Class III
    PSsix Member Super Class III


    อยากเปลี่ยนรูปแบบ Progress Bar ทำได้ไหมครับ Empty PSsix Program Coder
    จำนวนข้อความ : 217
    ความนิยม : 54
    เข้าร่วมเมื่อ : 19/06/2011

    อยากเปลี่ยนรูปแบบ Progress Bar ทำได้ไหมครับ Empty Re: อยากเปลี่ยนรูปแบบ Progress Bar ทำได้ไหมครับ

    ตั้งหัวข้อ by Fast 17/01/12, 06:10 pm

    ไปหาใน autoitscript เจอนี่ [You must be registered and logged in to see this link.] อย่างสวยเลย โค๊ดเอาไปแก้นิดหน่อย

    Code:
    #include <GuiConstants.au3>
    #include <WinApi.au3>
    #include <GdiPlus.au3>

    Global $ahCallBack[2], $iPrecent

    $Gui = GUICreate("Gradient ProgressBar", 400, 300)

    GUICtrlCreateLabel("", 9, 9, 302, 22, -1);, $WS_EX_STATICEDGE)
    GUICtrlCreateLabel("", 9, 39, 302, 22, -1);, $WS_EX_STATICEDGE)

    GUICtrlCreateLabel("There is  few more colors commented in the script bellow...", 10, 200)

    $Status_Label = GUICtrlCreateLabel("0%", 330, 30, 30, 20)

    $Button = GUICtrlCreateButton("Start",150,100,50,20)

    _GDIPlus_Startup()

    $hGraphic1 = _GDIPlus_GraphicsCreateFromHWND($Gui)

    $hBitMap = _GDIPlus_BitmapCreateFromGraphics(300, 20, $hGraphic1)

    $hGraphic2 = _GDIPlus_ImageGetGraphicsContext($hBitMap)

    $hPen = _GDIPlus_PenCreate(0,1)

    $Depth = 1.64 ; Min = 1.10  Max = 1.70

    For $i = 1 To 20
    ;~  $PenColor = "0xFF" & Hex(255 - $i, 2) & Hex(Round(240 - $i^$Depth), 2) & "3B" ; Orange
    ;~  $PenColor = "0xFF" & Hex(255 - $i, 2) & Hex(Round(200 - $i^$Depth), 2) & "FF" ; Magenta
    ;~  $PenColor = "0xFF" & Hex(80  + $i, 2) & Hex(Round(240 - $i^$Depth), 2) & "3B" ; Green
        $PenColor = "0xFF" & Hex(80  + $i, 2) & Hex(Round(240 - $i^$Depth), 2) & "FF" ; Blue
        _GDIPlus_PenSetColor($hPen, $PenColor)
        _GDIPlus_GraphicsDrawLine($hGraphic2, 0, $i-1, 300, $i-1, $hPen)
    Next

    _GDIPlus_PenDispose($hPen)
    _GDIPlus_GraphicsDispose($hGraphic2)


    $hBitMap_Multiply = _GDIPlus_BitmapCreateFromGraphics(300, 20, $hGraphic1)
    $hGraphic2 = _GDIPlus_ImageGetGraphicsContext($hBitMap_Multiply)

    For $i = 0 To 15 Step 5
        _GDIPlus_GraphicsDrawImageRectRect($hGraphic2, $hBitMap, 0, 0, 300, 20, 0, $i, 300, 5)
    Next

    _GDIPlus_GraphicsDispose($hGraphic2)

    GUISetState()

    While 1
        $nMsg = GUIGetMsg()
        Switch $nMsg
            Case $Button
                If $iPrecent = 0 Then _WinAPI_RedrawWindow($Gui)

                If GUICtrlRead($Button) = "Stop" Then
                    GUICtrlSetData($Button, "Start")
                    CallBack_Free($ahCallBack)

                    ContinueLoop
                EndIf

                GUICtrlSetData($Button, "Stop")

                $ahCallBack = CallBack_Init("Paint_Proc", 10)
            Case $GUI_EVENT_CLOSE
                CallBack_Free($ahCallBack)

                _GDIPlus_ImageDispose($hBitmap)
                _GDIPlus_ImageDispose($hBitMap_Multiply)
                _GDIPlus_GraphicsDispose($hGraphic1)
                _GDIPlus_Shutdown()

                Exit
        EndSwitch
    WEnd

    Func Paint_Proc($hWnd, $nMsg, $wParam, $lParam)
        $iPrecent += 1

        GUICtrlSetData($Status_Label, Round($iPrecent / 3) & "%")

        If $iPrecent > 300 Then
            $iPrecent = 0

            GUICtrlSetData($Status_Label, "100%")
            GUICtrlSetData($Button, "Start")
            CallBack_Free($ahCallBack)

            $ahCallBack = 0
            Dim $ahCallBack[2] = [-1, -1]
        EndIf

        _GDIPlus_GraphicsDrawImageRectRect($hGraphic1, $hBitMap, 0, 0, $iPrecent, 20, 10, 10, $iPrecent, 20)
        _GDIPlus_GraphicsDrawImageRectRect($hGraphic1, $hBitMap_Multiply, 0, 0, $iPrecent, 20, 10, 40, $iPrecent, 20)
    EndFunc

    Func CallBack_Init($sFuncName, $iTime, $sParam = "hwnd;int;int;dword")
        Local $hCallBack = DLLCallbackRegister($sFuncName, "int", $sParam)

        Local $aTimer = DllCall("user32.dll", "uint", "SetTimer", _
            "hwnd", 0, "uint", 0, "int", $iTime, "ptr", DllCallbackGetPtr($hCallBack))

        Local $ahCallBack[2] = [$hCallBack, $aTimer[0]]

        Return $ahCallBack
    EndFunc

    Func CallBack_Free($ahCallBack)
        If $ahCallBack[0] <> -1 Then DllCallbackFree($ahCallBack[0])
        If $ahCallBack[1] <> -1 Then DllCall("user32.dll", "int", "KillTimer", "hwnd", 0, "uint", $ahCallBack[1])
    EndFunc

    อีกแบบใส่รูป ง่ายดี อิอิ em218

    Code:
    #include <GUIConstants.au3>

    $Gradient_Progress_Bar_Img = @ScriptDir & "\Gradient_Progress_Bar.bmp"

    If Not FileExists($Gradient_Progress_Bar_Img) Then _
        InetGet("http://creator-lab.ucoz.ru/Images/Gradient_Progress_Bar.bmp", $Gradient_Progress_Bar_Img)

    $Gui = GUICreate("Gradient Progress Bar", 340, 100)
    GUISetBkColor(0xC0C0C0)

    GUICtrlCreateLabel("Progress Bar", 20, 15, 300, 15)
    GUICtrlCreatePic($Gradient_Progress_Bar_Img, 20, 30, 300, 15)

    $Cover_Label = GUICtrlCreateLabel("", 20, 30, 300, 15)

    $Go_Button = GUICtrlCreateButton("GO!", 20, 70, 40, 20)

    GUISetState(@SW_SHOW)

    While 1
        Switch GUIGetMsg()
            Case $GUI_EVENT_CLOSE
                Exit
            Case $Go_Button
                GUICtrlSetData($Go_Button, "Abort!")

                For $i = 15 To 315
                    ControlMove($Gui, "", $Cover_Label, $i + 5, 30, 315 - $i, 15)

                    $nMsg = GUIGetMsg()

                    If $nMsg = $Go_Button Then
                        ControlMove($Gui, "", $Cover_Label, 20, 30, 300, 15)
                        ExitLoop
                    EndIf

                    If $nMsg = $GUI_EVENT_CLOSE Then ExitLoop 2

                    Sleep(20)
                Next

                GUICtrlSetData($Go_Button, "GO!")
        EndSwitch
    WEnd

    aut
    aut
    PSsix Powerful Scripting Class
    PSsix Powerful Scripting Class


    PSsix Game Coder
    จำนวนข้อความ : 472
    ความนิยม : 126
    เข้าร่วมเมื่อ : 24/07/2010

    อยากเปลี่ยนรูปแบบ Progress Bar ทำได้ไหมครับ Empty Re: อยากเปลี่ยนรูปแบบ Progress Bar ทำได้ไหมครับ

    ตั้งหัวข้อ by aut 18/01/12, 09:55 pm

    โคดนาย fast เอามาอะ ใช้ยากชิปหอย ชินจัง3

    อานนี้มัวนะ

    #include
    #include
    #include
    #include
    #include
    #include
    #include
    Global $ahCallBack[2], $iPrecent

    #Region ### START Koda GUI section ### Form=
    $Form1 = GUICreate("Form1", 344, 81, 533, 227)
    $Button1 = GUICtrlCreateButton("Button1", 24, 8, 75, 25)
    $Label1 = GUICtrlCreateLabel(" ", 16, 40, 290, 10)
    GUICtrlSetBkColor(-1, 0xA0A0A0)
    GUISetState(@SW_SHOW)
    #EndRegion ### END Koda GUI section ###

    _GDIPlus_Startup()

    $hGraphic1 = _GDIPlus_GraphicsCreateFromHWND($Form1)

    $hBitMap = _GDIPlus_BitmapCreateFromGraphics(344, 9, $hGraphic1)

    $hGraphic2 = _GDIPlus_ImageGetGraphicsContext($hBitMap)

    $hPen = _GDIPlus_PenCreate(0,1)

    $Depth = 1.70 ; Min = 1.10 Max = 1.70

    For $i = 1 To 20

    $PenColor = "0xFF" & Hex(80 + $i, 2) & Hex(Round(240 - $i^$Depth), 4) & "3B" ; Green

    _GDIPlus_PenSetColor($hPen, $PenColor)
    _GDIPlus_GraphicsDrawLine($hGraphic2, 9, $i-1, 460, $i-1, $hPen)
    Next

    _GDIPlus_PenDispose($hPen)
    _GDIPlus_GraphicsDispose($hGraphic2)


    $hBitMap_Multiply = _GDIPlus_BitmapCreateFromGraphics(341, 9, $hGraphic1)
    $hGraphic2 = _GDIPlus_ImageGetGraphicsContext($hBitMap_Multiply)


    _GDIPlus_GraphicsDispose($hGraphic2)

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

    Case $Button1
    If $iPrecent = 0 Then _WinAPI_RedrawWindow($Form1)

    If GUICtrlRead($Button1) = "Stop" Then
    GUICtrlSetData($Button1, "Start")
    CallBack_Free($ahCallBack)

    ContinueLoop
    EndIf

    GUICtrlSetData($Button1, "Stop")

    $ahCallBack = CallBack_Init("Paint_Proc", 10)
    EndSwitch
    WEnd


    Func Paint_Proc($hWnd, $nMsg, $wParam, $lParam)
    $iPrecent += 1

    ;~ GUICtrlSetData($Status_Label, Round($iPrecent / 3) & "%")

    If $iPrecent > 300 Then
    $iPrecent = 0

    ;~ GUICtrlSetData($Status_Label, "100%")
    GUICtrlSetData($Button1, "Start")
    CallBack_Free($ahCallBack)

    $ahCallBack = 0
    Dim $ahCallBack[2] = [-1, -1]
    EndIf

    _GDIPlus_GraphicsDrawImageRectRect($hGraphic1, $hBitMap, 0, 0, $iPrecent, 19, 7, 40, $iPrecent, 20)
    _GDIPlus_GraphicsDrawImageRectRect($hGraphic1, $hBitMap_Multiply, 0, 0, $iPrecent, 20, 10, 40, $iPrecent, 20)
    EndFunc

    Func CallBack_Init($sFuncName, $iTime, $sParam = "hwnd;int;int;dword")
    Local $hCallBack = DLLCallbackRegister($sFuncName, "int", $sParam)

    Local $aTimer = DllCall("user32.dll", "uint", "SetTimer", _
    "hwnd", 0, "uint", 0, "int", $iTime, "ptr", DllCallbackGetPtr($hCallBack))

    Local $ahCallBack[2] = [$hCallBack, $aTimer[0]]

    Return $ahCallBack
    EndFunc

    Func CallBack_Free($ahCallBack)
    If $ahCallBack[0] <> -1 Then DllCallbackFree($ahCallBack[0])
    If $ahCallBack[1] <> -1 Then DllCall("user32.dll", "int", "KillTimer", "hwnd", 0, "uint", $ahCallBack[1])
    EndFunc
    Quixotic
    Quixotic
    PSsix Member High Class
    PSsix Member High Class


    PSsix Program Coder
    จำนวนข้อความ : 91
    ความนิยม : 1
    เข้าร่วมเมื่อ : 29/03/2011

    อยากเปลี่ยนรูปแบบ Progress Bar ทำได้ไหมครับ Empty Re: อยากเปลี่ยนรูปแบบ Progress Bar ทำได้ไหมครับ

    ตั้งหัวข้อ by Quixotic 19/01/12, 12:01 pm

    ไอย๊ะ อ๊ะๆๆๆ

    ขอบคุณทุกท่านครับบบบบบ

      เวลาขณะนี้ 19/04/24, 02:24 pm