Results 1 to 7 of 7

Thread: Circular Progressbar

  1. #1

    Thread Starter
    Super Moderator dday9's Avatar
    Join Date
    Mar 2011
    Posts
    12,374

    Circular Progressbar

    I've never made a user_control before. So I decided to do my take on the circular progressbar. I tried my best to mimic the one used by the most recent IE tabpage when a page is loading.

    Features:
    1. Has 2 layers. 1 layer that doesn't move, where as the other layer rotates.
    2. Uses a timer to rotate the circle


    Drawbacks:
    1. No gradient coloring
    2. Uses a timer, where as some like to use bg workers



    Plans:
    • None really. I'm content


    Custom Properties:
    1. circle_Color = The color of the circle. This color will "stand still" so to speak.
    2. rotating_Color = The rotating color. This color will be the color that rotates around the circle_Color
    3. circle_Width = The thickness of the circle and arc
    4. rotate_Speed = The speed of the rotation. Controls the timer's interval.


    ScreenShot:
    Name:  circular_progressbar.png
Views: 10688
Size:  7.8 KB

    Describing the screenshot: I used 2 radically different color in the screenshot. The purple layer is the circle_Color property where as the yellow rotating arc is the rotating_Color. In the screenshot, the circle_Width is set to 2.

    File:
    Circle Progressbar.zip

    Conclusion:
    I'm up to any suggestions. As this is my first user_control, I'm sure I messed something up?
    Last edited by dday9; Feb 27th, 2013 at 12:13 PM.
    "Code is like humor. When you have to explain it, it is bad." - Cory House
    VbLessons | HtmlLessons | CssLessons | Code Tags | Sword of Fury - Jameram

  2. #2

    Re: Circular Progressbar

    Not a bad job for a first control. A good, next feature would be perhaps to mimic all the features of a ProgressBar, but in a circular form. Food for thought!

  3. #3

    Thread Starter
    Super Moderator dday9's Avatar
    Join Date
    Mar 2011
    Posts
    12,374

    Re: Circular Progressbar

    I hope to put some more work into it later on down the line, and that's just one more thing I can do to improve it. I was actually terrified when I finally decided to tackle my first user_control, but it wasn't as hard as I thought it'd be. After a few trial and errors, I kinda got it down. Thanks for the feedback :]
    "Code is like humor. When you have to explain it, it is bad." - Cory House
    VbLessons | HtmlLessons | CssLessons | Code Tags | Sword of Fury - Jameram

  4. #4

    Re: Circular Progressbar

    Quote Originally Posted by dday9 View Post
    I hope to put some more work into it later on down the line, and that's just one more thing I can do to improve it. I was actually terrified when I finally decided to tackle my first user_control, but it wasn't as hard as I thought it'd be. After a few trial and errors, I kinda got it down. Thanks for the feedback :]
    If'n I get the chance, I'd be willing to write some sort of example. I think it'll be pretty cool to try.

  5. #5

    Thread Starter
    Super Moderator dday9's Avatar
    Join Date
    Mar 2011
    Posts
    12,374

    Re: Circular Progressbar

    Update

    As per formlesstree4's request, I tried to mimic the progressbar's features and added a few new properties:

    1. Minimum
    2. Maximum
    3. Value
    4. Progressbar Style


    With the progressbar styles you have 2 options:
    1. Marquee
    2. Continous


    Something that I don't like that perhaps one of y'all could enlighten me on is: if the progressbar style is continous, you have to call Me.Refresh after updating the value in order to redraw the control to reflect the updated value.

    File
    Attachment 91277

    Also, try setting either the circle_color or the rotate_color to Me.BackColor and the arc_length to 300. It looks pretty cool :P
    "Code is like humor. When you have to explain it, it is bad." - Cory House
    VbLessons | HtmlLessons | CssLessons | Code Tags | Sword of Fury - Jameram

  6. #6
    PowerPoster Nightwalker83's Avatar
    Join Date
    Dec 2001
    Location
    Adelaide, Australia
    Posts
    13,344

    Re: Circular Progressbar

    Cool! Now all it needs to to change colour and direction depending whether the data transfer is still go or whether it has stooped, say a green circle filling upwards for a transfer which is in progress and a red circle filling downward for a transfer that has stopped because of an error.
    when you quote a post could you please do it via the "Reply With Quote" button or if it multiple post click the "''+" button then "Reply With Quote" button.
    If this thread is finished with please mark it "Resolved" by selecting "Mark thread resolved" from the "Thread tools" drop-down menu.
    https://get.cryptobrowser.site/30/4111672

  7. #7

    Re: Circular Progressbar

    Quote Originally Posted by Nightwalker83 View Post
    Cool! Now all it needs to to change colour and direction depending whether the data transfer is still go or whether it has stooped, say a green circle filling upwards for a transfer which is in progress and a red circle filling downward for a transfer that has stopped because of an error.
    Why not do that manually? Just change the foreground color for the status!

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