Search EggHeadCafe's Job Board
EggHeadCafe Silverlight WPF ASP.NET VB.NET C# Excel SQL Server SharePoint
search
MicrosoftArticlesForumsFAQs
C# .NET
VB.NET
Visual Studio .NET
ADO.NET
Xml / Xslt
VB 6.0
.NET CF
GDI+
LINQ
Deployment
Security
FoxPro
Silverlight / WPF
Entity Framework
RIA Services

WebArticlesForumsFAQs
JavaScript
ASP
ASP.NET
WCF

DatabasesArticlesForumsFAQs
SQL Server
Access
Oracle
MySQL
Other Databases

OfficeArticlesForumsFAQs
Excel
Word
Powerpoint
Outlook
Publisher
Money

Non-MicrosoftArticlesForumsFAQs
NHibernate
Perl
PHP
Ruby
Java
Linux / Unix
Apple
Open Source

Operating SysArticlesForumsFAQs
Windows 7
Windows Server
Windows Vista
Windows XP
Windows Update
MAC
Linux / UNIX

Server PlatformsArticlesForumsFAQs
BizTalk
Site Server
Exhange Server
IIS

Graphic DesignArticlesForumsFAQs
Macromedia Flash
Adobe PhotoShop
Expression Blend
Expression Design
Expression Web

OtherArticlesForumsFAQs
Lounge
Subversion / CVS
Ask Dr. Dotnetsky
Active Directory
Networking
Uninstall Virus
Job Openings
Product Reviews
Search Engines
Resumes

 

  View Other C# .NET Posts   Ask New Question  Ask New Question With Power Editor

C# 3.0 - Hide tabPages headers
Aldo Liaks posted at Wednesday, May 14, 2008 5:20 AM

Hi guys,

Is this (see below) the best way to hide tabPages headers?

taken from: http://forums.microsoft.com/MSDN/ShowPost.aspx?PageIndex=1&SiteID=1&PageID=1&PostID=2501509

Thanks,

Aldo.

Add a new class to your project, paste the code shown below and build the project.  You can now drop the control from the top of the toolbox onto your form.  At design time, the control looks like a regular TabControl.  At run-time, you only see the pages.  Use the SelectedIndex property to step through the pages.

Code Block

using System;

using System.Windows.Forms;

 

public class WizardPages : TabControl

{

    protected override void WndProc(ref Message m)

    {

        // Hide tabs by trapping the TCM_ADJUSTRECT message

        if (m.Msg == 0x1328 && !DesignMode) m.Result = (IntPtr)1;

        else

           base.WndProc(ref m);

    }

         }

Reply    Reply Using Power Editor
  Rank Winnings Points
November 0 $0.00 0
October 0 $0.00 0