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!