CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3
  1. #1
    Join Date
    Nov 1999
    Location
    Boston
    Posts
    18

    ProgressBar on StatusBar on MDI

    I've seen the post on showing the progressbar on the statusbar, but it doesn't seem to work on an MDI form. I think the problem is the progress bar Align property being forced to be non-zero in this situation. The rectangle for the statusbar panel is correct, but I always get a full-length bar. Any suggestions?


  2. #2
    Join Date
    Sep 1999
    Location
    Red Wing, MN USA
    Posts
    312

    Re: ProgressBar on StatusBar on MDI

    You can always fake a Progress bar, eg.

    private Sub MDIForm_Load()
    Timer1.Interval = 100
    Picture1.Visible = false
    Picture1.Font = StatusBar1.Font
    End Sub

    private Sub Timer1_Timer()
    static ival as Integer
    ival = (ival + 1) Mod 100
    ProgressBar ival, 100
    End Sub

    private Sub ProgressBar(byval iValue as Integer, byval iMax as Integer)
    With StatusBar1.Panels(1)
    .Text = string(Int((((.Width - 100) / Picture1.TextWidth(Chr(0))) / iMax) * iValue), Chr(10))
    End With
    End Sub



    Aaron Young
    Analyst Programmer
    [email protected]
    [email protected]
    Aaron Young
    Senior Programmer Analyst (Red Wing Software)
    Certified AllExperts Expert

  3. #3
    Join Date
    Nov 1999
    Location
    Boston
    Posts
    18

    Re: ProgressBar on StatusBar on MDI

    Not bad, but I'd like it to look "standard".


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

Featured