Results 1 to 16 of 16

Thread: Progress Bar, with label on top?

Threaded View

  1. #10
    Junior Member
    Join Date
    Dec 2011
    Posts
    20

    Re: Progress Bar, with label on top?

    No i have not again create the new thread
    Thanks for your answer Bobbles, unfortunately the link of the zip is broken :-(

    Edit : But i have found the solution thanks to this thread
    http://www.vbforums.com/showthread.p...=1#post3574251

    In fact a simple "pb.Refresh" is needed
    Code:
    Public Sub TextOnProgress(pb As ProgressBar, ByVal sText As String)
    
        Dim hDC As Long
        Dim r As RECT
        
        hDC = GetDC(pb.hwnd)
        pb.Refresh
        SetBkMode hDC, TRANSPARENT
        GetClientRect pb.hwnd, r
        SetTextColor hDC, &HFFFFFF
        DrawText hDC, sText, -1&, r, DT_CENTER
        ReleaseDC pb.hwnd, hDC
            
    End Sub
    Thanks for your help
    Have a good day
    Last edited by AndreBernard; Sep 26th, 2017 at 03:15 AM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width