Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Visual Basic > VB.NET 1.0 > Pro VB.NET 2002/2003
|
Pro VB.NET 2002/2003 For advanced Visual Basic coders working .NET version 2002/2003. Beginning-level questions will be redirected to other forums, including Beginning VB.NET.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Pro VB.NET 2002/2003 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old October 6th, 2004, 06:03 AM
Authorized User
 
Join Date: Jun 2003
Posts: 61
Thanks: 0
Thanked 0 Times in 0 Posts
Default How to Increase the NonClient Area of a form

Hey guyz::

   I would like to increase the noncleint area of a VB.Net form. Mainly i would like to increase the caption bar(title bar) can anyone refer me to any documentation or show me some examples in vb.Net.

Here is a piece of code in MFC i found from microsoft site it supposedly does the same thing but am not very good with MFC.

 
Quote:
quote:case WM_NCACTIVATE:
Quote:
      if ((BOOL)wParam == FALSE)
      {
         DefWindowProc( hWnd, message, wParam, lParam );
      // Add code here to draw caption when window is inactive.

         return TRUE;
      }
      // Fall through if wParam == TRUE, i.e., window is active.

      case WM_NCPAINT:
      // Let Windows do what it usually does. Let the window caption
      // be empty to avoid any Windows-initiated caption bar drawing

         DefWindowProc( hWnd, message, wParam, lParam );
         hDC = GetWindowDC( hWnd );
         GetWindowRect( hWnd, (LPRECT)&rc2 );

      // Compute the caption bar's origin. This window has a system box
      // a minimize box, a maximize box, and has a resizeable frame

         x = GetSystemMetrics( SM_CXSIZE ) +
             GetSystemMetrics( SM_CXBORDER ) +
             GetSystemMetrics( SM_CXFRAME );
         y = GetSystemMetrics( SM_CYFRAME );
         rc1.left = x;
         rc1.top = y;

      // 2*x gives twice the bitmap+border+frame size. Since there are
      // only two bitmaps, two borders, and one frame at the end of the
      // caption bar, subtract a frame to account for this.

         rc1.right = rc2.right - rc2.left - 2*x -
                     GetSystemMetrics( SM_CXFRAME );
         rc1.bottom = GetSystemMetrics( SM_CYSIZE );

      // Render the caption. Use the active caption color as the text
      // background.

         SetBkColor( hDC, GetSysColor(COLOR_ACTIVECAPTION) );
         DrawText( hDC, (LPSTR)"Left Justified Caption", -1,
                 (LPRECT)&rc1, DT_LEFT );
        ReleaseDC( hWnd, hDC );
        break;
The url is::http://support.microsoft.com/default...9046#appliesto

If u can translate that for me to VB.Net i would apreciate it or else u can pass me a diff example.

LION OF JUDDAH!
__________________
LION OF JUDDAH!





Similar Threads
Thread Thread Starter Forum Replies Last Post
change Client Area of Form angelboy C# 2005 1 April 24th, 2008 07:36 AM
Increase mysql storage mgnishan MySQL 0 February 7th, 2007 01:37 AM
increase DB space... RinoDM SQL Server 2000 5 October 12th, 2006 11:07 PM
Rectangle.Contains Method - In NonClient Area chiefouko Pro VB.NET 2002/2003 0 September 30th, 2004 12:32 AM
How to increase speed manishgore Pro VB Databases 5 March 2nd, 2004 05:17 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.