Windows Vista compatibility


Custom Border Form does not work very well in Windows Vista.


kpfile wrote Aug 24, 2006 at 8:33 PM

The border initially shows up as either all black or all white. If you drag the border off the screen and back, you can eventually get it looking normal. Minimizing and maximizing the form will make it really wonky, and you will see system buttons in the top left of the form that do not work.

This is under the Aero Glass interface in Vista Beta 2. This is a tough issue because the behavior might change depending on how Vista evolves.

wrote Sep 12, 2006 at 3:15 PM

kpfile wrote Nov 16, 2006 at 9:04 PM

I was able to resolve this issue. In the PaintNonClient area function, //IntPtr hDC = NativeMethods.GetDCEx(hWnd, hRgn, // (int)(NativeMethods.DCX.DCX_WINDOW | NativeMethods.DCX.DCX_INTERSECTRGN // | NativeMethods.DCX.DCX_CACHE | NativeMethods.DCX.DCX_CLIPSIBLINGS));

Is called. This function is not working correctly in Windows XP 64 bit or Windows Vista. It will return the null pointer in some cases. IntPtr hDC = NativeMethods.GetWindowDC(hWnd);This second call works correctly in all OSes i've tested from Win2k to Vista RC2 64 bit. I'm not quite sure what the problem is, or what I lose by calling it instead, but it works.

(add the following to NativeMethods) [DllImport("user32.dll")] public static extern IntPtr GetWindowDC(IntPtr hwnd);

mynab wrote Feb 8, 2007 at 8:17 PM


thanks for the fix although we loose the clip siblings option. In my About box where I have a textbox above the custom background, the textbox disappears when hovered...

So I think we need a true Vista compatibility.Thanks

wrote Feb 8, 2007 at 8:18 PM

ddpatel wrote Jan 23, 2010 at 8:43 AM

I am having problem while using CustomBorderForm in Vista. Title bar of the form becomes invisible or sometimes becomes white and the minimize, maximize and close button also becomes invisible. Please give me solution for this if anyone have found. Thanks a lot.

wrote Feb 14, 2013 at 8:26 PM