Jump to content

Progressbar with GDIplus


ProgAndy
 Share

Recommended Posts

  • 2 weeks later...
  • Replies 54
  • Created
  • Last Reply

Top Posters In This Topic

Dear ProgAndy, sorry that so late reply (long, does not go to the forum), but your example does not work. Progress bar does not display BMP images. Please upload the example in archive. Thanks

Edited by ynbIpb
Link to comment
Share on other sites

I haven't tried it, but I've tried similar, and looking at your screen shots, I don't see one feature, that I'm not sure can be done. What I would like, is for the text to be an inverse color of the bar underneath. For example, if you have a black progress bar, the text will be black until the progress bar reaches it, then it will turn white. But only the parts of the text the bar is under. So basically it would require a inverse color pen or something of that sorts?

Giggity

Link to comment
Share on other sites

Dear ProgAndy, sorry that so late reply (long, does not go to the forum), but your example does not work. Progress bar does not display BMP images. Please upload the example in archive. Thanks

Why? OK, here it is: http://www.megaupload.com/?d=HUPQB2B0

@youknowwho4eva : i know how to calculate the inverse color, but i don't know how to apply it to a part of the string ;(

Edited by ProgAndy

*GERMAN* [note: you are not allowed to remove author / modified info from my UDFs]My UDFs:[_SetImageBinaryToCtrl] [_TaskDialog] [AutoItObject] [Animated GIF (GDI+)] [ClipPut for Image] [FreeImage] [GDI32 UDFs] [GDIPlus Progressbar] [Hotkey-Selector] [Multiline Inputbox] [MySQL without ODBC] [RichEdit UDFs] [SpeechAPI Example] [WinHTTP]UDFs included in AutoIt: FTP_Ex (as FTPEx), _WinAPI_SetLayeredWindowAttributes

Link to comment
Share on other sites

Why? OK, here it is: http://www.megaupload.com/?d=HUPQB2B0

@youknowwho4eva : i know how to calculate the inverse color, but i don't know how to apply it to a part of the string ;(

Same issue here, calculating it is no problem.... I'm thinking the solution would be to export the text area as an image, and I believe in GDI+ you can edit colors in an image, right?. then it may be possible that way. I have 0 time to mess with it right now, and that's beyond my GDI+ capabilities right now. But may be something for you to look into.

Giggity

Link to comment
Share on other sites

OK, i found a solution with SetClipRect ^_^

The download in the first post is updated.

*GERMAN* [note: you are not allowed to remove author / modified info from my UDFs]My UDFs:[_SetImageBinaryToCtrl] [_TaskDialog] [AutoItObject] [Animated GIF (GDI+)] [ClipPut for Image] [FreeImage] [GDI32 UDFs] [GDIPlus Progressbar] [Hotkey-Selector] [Multiline Inputbox] [MySQL without ODBC] [RichEdit UDFs] [SpeechAPI Example] [WinHTTP]UDFs included in AutoIt: FTP_Ex (as FTPEx), _WinAPI_SetLayeredWindowAttributes

Link to comment
Share on other sites

  • 1 month later...
  • 2 months later...

hi can you tell me why this is freezing up my window when i try to close

Opt("GUIOnEventMode", 1)
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#Include <GDIpProgress.au3>

GUICreate("GUI")
GUISetOnEvent($GUI_EVENT_CLOSE, "_Exit")

$ID = _ProgressCreate (12, 22, 280, 18)


GUISetState()


While 1
    Sleep (250)
WEnd

Exit

Func _Exit()
    _ProgressDelete($ID)
    Exit
EndFunc
Link to comment
Share on other sites

  • 1 month later...
  • 1 year later...

Thank you, I have fixed it. If a link to an UDF does not work, you should always be able to find it under Downloads->AutoItUDFs

*GERMAN* [note: you are not allowed to remove author / modified info from my UDFs]My UDFs:[_SetImageBinaryToCtrl] [_TaskDialog] [AutoItObject] [Animated GIF (GDI+)] [ClipPut for Image] [FreeImage] [GDI32 UDFs] [GDIPlus Progressbar] [Hotkey-Selector] [Multiline Inputbox] [MySQL without ODBC] [RichEdit UDFs] [SpeechAPI Example] [WinHTTP]UDFs included in AutoIt: FTP_Ex (as FTPEx), _WinAPI_SetLayeredWindowAttributes

Link to comment
Share on other sites

  • 2 weeks later...

Modify. Vista Progressbar Percentage. No, Titlebar. :)

#NoTrayIcon
#include <GDIpProgress.au3>

Global $Gui, $sID, $nMsg
Global $i = 0, $wait = 47, $time = 100

Main()
Func Main()
    $Gui = GUICreate("VistaProgressBar", 300, 18, -1, -1, _
    BitOR($WS_MINIMIZEBOX,$WS_SYSMENU,$WS_DLGFRAME,$WS_POPUP,$WS_GROUP,$WS_CLIPSIBLINGS), _
    BitOR($WS_EX_TOPMOST,$WS_EX_WINDOWEDGE))
    $sID = _ProgressCreate(0, 0, 300, 20)
    _ProgressSetImages($sID, @ScriptDir & "\prgimgs\green.jpg", @ScriptDir & "\prgimgs\bg.jpg")
    _ProgressSetFont($sID, "", -1, -1, 0x0000FF)
    GUISetState()

    While 1
        $nMsg = GUIGetMsg()
        ;If $nMsg = $GUI_EVENT_CLOSE Then ExitLoop
        Switch $nMsg
            Case 0
                $i += 1
                Sleep($time)
                _ProgressSet($sID, $i)
                _ProgressSetText($sID, $i)
                If $i = $wait Then
                    _ProgressSetFont($sID, "", -1, -1, 0xFFFFFF)
                Else
                    If $i > $time Then
                        ExitLoop
                    EndIf
                EndIf
        EndSwitch
    WEnd
EndFunc
Edited by sak
Link to comment
Share on other sites

  • 11 months later...

Since the latest stable release of AutoIT, this UDF doesn't work quite right. The colors of the progress bar are black always, no matter how I specify them. If I role back to AutoIT version 3.3.7.0, the script will compile fine.

I am thinking that something has changed maybe in the GDIPlus.au3 to have broken this, though I am not sure what.

If you have any ideas where the problems lies, it'd be great if it could be fixed.

Thanks,

Jeff

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...