You cannot easily get the exact Win98 look without a pretty drastic rewrite of the control. But a simple flat light-blue progress bar can be had by turning off visual styles. Like this:
using System;
using System.Windows.Forms;
using System.Runtime.InteropServices;
class SimpleProgressBar : ProgressBar {
protected override void OnHandleCreated(EventArgs e) {
base.OnHandleCreated(e);
if (Environment.OSVersion.Version.Major >= 6) {
SetWindowTheme(this.Handle, "", "");
}
}
[DllImport("uxtheme.dll")]
private static extern int SetWindowTheme(IntPtr hWnd, string appname, string idlist);
}
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…