By default borderless forms are not designed to be minimized, which means when the form’s
FormBorderStyle property is set to None you will notice that clicking the application box in taskbar does not minimize the form.
This can be fixed by overriding
CreateParams and adding the
WS_MINIMIZEBOX style to the Window and
CS_DBLCLKS to the Window class styles.
Simply place the following code inside your Form’s class which you want to enable the minimize functionality using the taskbar.
const int WS_MINIMIZEBOX = 0x20000;
const int CS_DBLCLKS = 0x8;
protected override CreateParams CreateParams
CreateParams cp = base.CreateParams;
cp.Style |= WS_MINIMIZEBOX;
cp.ClassStyle |= CS_DBLCLKS;
Some controls do not have their
DoubleBuffered property listed in the properties window. For this reason it requires an additional step to enable double buffering for specific controls such as a ListView control.
If you wish to enable the
DoubleBuffed property of a control simply use the method provided below.
public static void SetDoubleBuffering(System.Windows.Forms.Control control, bool value)
System.Reflection.PropertyInfo controlProperty = typeof(System.Windows.Forms.Control)
.GetProperty("DoubleBuffered", System.Reflection.BindingFlags.NonPublic | System.Reflection.BindingFlags.Instance);
controlProperty.SetValue(control, value, null);
Firefox by default never clears the download list automatically. If you wish change the way Firefox works so it will clear the downloads either automatically upon download complete or when Firefox closes following the next steps.
- Type about:config in your address bar
- Search for browser.download.manager.retention
- Set its value to either 0, 1 or 2 depending on how you Firefox to behave
0 indicates that the download should be removed upon completion.
1 indicates that completed and canceled downloads should be removed when Firefox closes.
2 indicates that downloads should never be removed automatically. (default)