How to create a "Continuous Progress Bar"

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • santhosh1985
    New Member
    • Sep 2011
    • 2

    How to create a "Continuous Progress Bar"

    How to create a "Continuous Progress Bar" in C#
    I am using this code
    "progressBar1.S tyle = ProgressBarStyl e.Continuous"
    but it is not working
  • arvindps
    New Member
    • Sep 2011
    • 8

    #2
    use the following code

    Code:
    using System; 
    using System.Windows.Forms; 
    
    public class ContinuousProgressBar : ProgressBar { 
      public ContinuousProgressBar() { 
        this.Style = ProgressBarStyle.Continuous; 
      } 
      protected override void CreateHandle() { 
        base.CreateHandle(); 
        try { SetWindowTheme(this.Handle, "", ""); } 
        catch { } 
      } 
      [System.Runtime.InteropServices.DllImport("uxtheme.dll")] 
      private static extern int SetWindowTheme(IntPtr hwnd, string appname, string idlist); 
    }
    Last edited by Niheel; Sep 30 '11, 03:37 PM.

    Comment

    • Plater
      Recognized Expert Expert
      • Apr 2007
      • 7872

      #3
      What do you mean it is "not working";
      I just dropped a progress bar on my form and set it to continuous and it looked fine?

      Comment

      Working...