Advertisement
H4x0

Hide Tabs in TabControl

Oct 31st, 2014
314
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.28 KB | None | 0 0
  1. using System;
  2. using System.Windows.Forms;
  3.  
  4. class WizardPages : TabControl {
  5.   protected override void WndProc(ref Message m) {
  6.     // Hide tabs by trapping the TCM_ADJUSTRECT message
  7.     if (m.Msg == 0x1328 && !DesignMode) m.Result = (IntPtr)1;
  8.     else base.WndProc(ref m);
  9.   }
  10. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement