Friday, 30 August 2013

Keep my form above the taskbar?

Keep my form above the taskbar?

My overall goal is to render a second (or third, fourth...) mouse cursor.
To this end, I have created a frameless, topmost, transparent window. I
can draw on this window (I have 4 buttons on it to show that it's properly
covering the whole desktop) - but when I click on the taskbar, it is
brought to the top and overlays my buttons and drawn line.
How can I keep my window above the taskbar?
Alternatively, is there a way that I can draw on the "final" version of
the screen?
Thanks in advance!
Here's the code from my .Designer.cs file:
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;
this.BackColor = System.Drawing.Color.White;
this.CausesValidation = false;
this.ClientSize = new System.Drawing.Size(332, 332);
this.ControlBox = false;
this.Controls.Add(this.button4);
this.Controls.Add(this.button3);
this.Controls.Add(this.button2);
this.Controls.Add(this.button1);
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
this.MaximizeBox = false;
this.MinimizeBox = false;
this.Name = "Screen";
this.ShowIcon = false;
this.SizeGripStyle = System.Windows.Forms.SizeGripStyle.Hide;
this.StartPosition =
System.Windows.Forms.FormStartPosition.WindowsDefaultBounds;
this.TopMost = true;
this.TransparencyKey = System.Drawing.Color.White;

No comments:

Post a Comment