Results 1 to 8 of 8

Thread: Help Vertical progess bar

  1. #1

    Thread Starter
    Lively Member Brian Henry's Avatar
    Join Date
    Oct 2005
    Posts
    94

    Help Vertical progess bar

    Is there a Vertical progress bar that will step by 0.01
    Brian Henry
    Visual Studio 2001 to 2019
    Java/Android
    ISaGRAF

  2. #2
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,221

    Re: Help Vertical progess bar

    There's no need to step by 0.01. You simply multiply your Maximum by 100 and then step by 1.

    As for vertical orientation, I'm sure there are various examples available, both free and commercial, with varying degrees of professionalism. If you want the visual style of the standard .NET ProgressBar then you might not get a freebie, but then again you might. I'm not aware of any specifically but if I wanted one I'd be searching the web for the obvious keywords.

    Alternatively, it's not that hard to create your own progress bar. You could simply use a Label or a Panel and adjust its Height according to some calculation. You could also get fancier, using GDI+ to draw the bar with textures or whatever.
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

  3. #3
    PowerPoster 2.0 Negative0's Avatar
    Join Date
    Jun 2000
    Location
    Southeastern MI
    Posts
    4,367

    Re: Help Vertical progess bar

    WPF has the ability to rotate controls easily. If you are willing to use WPF, here is an example:

    http://www.vbforums.com/showthread.p...g+progress+bar

  4. #4
    PowerPoster
    Join Date
    Apr 2007
    Location
    The Netherlands
    Posts
    5,070

    Re: Help Vertical progess bar

    The standard progressbar can be shown vertically as well by using some API's. I can't remember nor find them anymore but I'm sure they exist.

    EDIT
    Try this:
    vb.net Code:
    1. Imports System
    2. Imports System.Windows.Forms
    3.  
    4. Public Class VerticalProgressBar
    5. * * Inherits ProgressBar
    6. * * Protected Overloads Overrides ReadOnly Property CreateParams() As CreateParams
    7. * * * * Get
    8. * * * * * * Dim cp As CreateParams = MyBase.CreateParams
    9. * * * * * * cp.Style = cp.Style Or &H4
    10. * * * * * * Return cp
    11. * * * * End Get
    12. * * End Property
    13. End Class

    I don't think this is the way I did it in the past, but it seems to work. It draws the progressbar just the same as the standard windows progressbar so there's no worry about it looking different.

    Note that it's value counts from the bottom up though, so a Value of 30 would show the bottom 30% filled and the top 70% not filled. I'm not sure if you can get it the other way around.

  5. #5
    I'm about to be a PowerPoster! kleinma's Avatar
    Join Date
    Nov 2001
    Location
    NJ - USA (Near NYC)
    Posts
    23,373

    Re: Help Vertical progess bar

    have a look here:

    http://social.msdn.microsoft.com/For...5-d114fe456f54


    EDIT: Looks like the same thing that Nick posted

  6. #6

  7. #7
    I'm about to be a PowerPoster! kleinma's Avatar
    Join Date
    Nov 2001
    Location
    NJ - USA (Near NYC)
    Posts
    23,373

    Re: Help Vertical progess bar

    What is more odd to me is why the .NET progress bar doesn't support vertical. The VB6 one did. I even thought about importing the common controls OCX and using that, but then I figured you wouldn't get visual styles probably. So I searched because I figured there would likely be some winproc override or something of that nature to change the progbar orientation, and sure enough, there it was

  8. #8

    Thread Starter
    Lively Member Brian Henry's Avatar
    Join Date
    Oct 2005
    Posts
    94

    Re: Help Vertical progess bar

    Thanks for the help. I found an example on CodeProject.
    Brian Henry
    Visual Studio 2001 to 2019
    Java/Android
    ISaGRAF

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