private void FormShown(object sender, EventArgs e)
{
this.BackColor = Color.DarkGray;
this.Opacity = 0.98;
this.FormBorderStyle = FormBorderStyle.None;
this.AutoScaleMode = AutoScaleMode.None;
this.ControlBox = false;
this.ShowInTaskbar = false;
this.StartPosition = FormStartPosition.Manual;
this.Location = tocover.PointToScreen(Point.Empty);
this.ClientSize = tocover.ClientSize;
tocover.LocationChanged += ParentLocationChanged;
tocover.ClientSizeChanged += ParentSizeChanged;
//this.Show(tocover);
if (Environment.OSVersion.Version.Major >= 6)
{
int value = 1;
DwmSetWindowAttribute(tocover.Handle, DWMWA_TRANSITIONS_FORCEDISABLED, ref value, 4);
}
this.Visible = true;
}