Reputation: 33
How is it possible to move a borderless (FormBorderStyle.None) form out of window (= negative coordinates)?
I already tried the following things:
Any ideas?
Upvotes: 1
Views: 912
Reputation: 1334
The answer is; ( which not works under multi monitors)
this.Location = new Point(-1 * this.Width, -1 * this.Height);
You may hide your window by setting;
this.Visible = false;
Upvotes: 3
Reputation: 942368
Once you created a task bar out of your window with SHAppBarMessage, the window's location is controlled by the shell, depending on what edge you selected. You need to use either ABM_REMOVE, which destroys the task bar completely, or ABM_SETSTATE which lets you change it to an auto-hide task bar. Moving another window on top of the task bar doesn't work, the shell prevents it to allow a task bar to behave like, well, a task bar.
Upvotes: 1