2010-07-12 65 views

回答

1

使用此項

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); 
}