|
-
Jan 28th, 2002, 12:58 AM
#1
Thread Starter
New Member
Any way to change border color for my form? (without screwing gloabally)
I want to change the color of the border on my vb form from (whatever windows color scheme currently being used).
I wonder if there is a way to do it without having to use SetSysColor. Because that screws gloabally.
'd also like to change the color of the scrollbars.
-
Jan 28th, 2002, 11:18 AM
#2
Fanatic Member
Not an easy thing to do!
The short answer is No but as with all things in Windows there are other ways.
1. Create a borderless window and put a bitmap window onto the form, then set up regions for the caption and caption buttons to emulate the form etc.
2. Repaint the form using subclassing, using it's hDC, and API calls to replace the colours you want. This will have to be redone on form move, resize, create, repaint and scrollbar messages blah, blah........
So, the Windows GDI motto is...... leave well alone.
-
Jan 28th, 2002, 11:32 AM
#3
Frenzied Member
When any of the non client area of a window needs to be drawn, windows sends a WM_NCPAINT event to that window.
In response to this message you can draw the non client area using any brush (and therefore any colour or colours) you require.
However, it isn't straight forward and does require that you use subclassing...
HTH,
Duncan
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|