mirror of
https://github.com/mRemoteNG/mRemoteNG.git
synced 2026-02-26 12:08:37 +08:00
29 lines
864 B
C#
29 lines
864 B
C#
using System;
|
|
using System.Windows.Forms;
|
|
using mRemoteNG.App;
|
|
|
|
namespace mRemoteNG.UI.Controls
|
|
{
|
|
public class HeadlessTabControl : TabControl
|
|
{
|
|
protected override void WndProc(ref Message m)
|
|
{
|
|
// Hide tabs by trapping the TCM_ADJUSTRECT message
|
|
if (m.Msg == NativeMethods.TCM_ADJUSTRECT && !DesignMode)
|
|
m.Result = (IntPtr)1;
|
|
else
|
|
base.WndProc(ref m);
|
|
}
|
|
|
|
private void InitializeComponent()
|
|
{
|
|
this.SuspendLayout();
|
|
//
|
|
// HeadlessTabControl
|
|
//
|
|
this.Font = new System.Drawing.Font("Segoe UI", 8.25F, System.Drawing.FontStyle.Regular,
|
|
System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
|
this.ResumeLayout(false);
|
|
}
|
|
}
|
|
} |