mirror of
https://github.com/LorenzCK/OnTopReplica.git
synced 2024-05-20 20:33:06 +12:00
Fixed title: now form has no caption, but keeps title in task bar.
This commit is contained in:
parent
82b8ed0319
commit
f5e4231cf9
2
OnTopReplica/MainForm.Designer.cs
generated
2
OnTopReplica/MainForm.Designer.cs
generated
|
@ -501,8 +501,10 @@
|
|||
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.SizableToolWindow;
|
||||
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
|
||||
this.MaximizeBox = false;
|
||||
this.MinimizeBox = false;
|
||||
this.MinimumSize = new System.Drawing.Size(20, 34);
|
||||
this.Name = "MainForm";
|
||||
this.Text = "OnTopReplica";
|
||||
this.TopMost = true;
|
||||
this.menuContext.ResumeLayout(false);
|
||||
this.menuWindows.ResumeLayout(false);
|
||||
|
|
|
@ -73,6 +73,16 @@ namespace OnTopReplica {
|
|||
|
||||
#region Event override
|
||||
|
||||
protected override CreateParams CreateParams {
|
||||
get {
|
||||
//Needed to hide caption, while keeping window title in task bar
|
||||
var parms = base.CreateParams;
|
||||
parms.Style &= ~0x00C00000; //WS_CAPTION
|
||||
parms.Style &= 0x00040000; //WS_SIZEBOX
|
||||
return parms;
|
||||
}
|
||||
}
|
||||
|
||||
protected override void OnShown(EventArgs e) {
|
||||
base.OnShown(e);
|
||||
|
||||
|
|
Loading…
Reference in a new issue