Agent
06-01-2002, 03:34 PM
How do I set the border of a form (actually a MDI form)? I'm
pretty sure I use SetWindowLong but I don't know what
arguments to use in conjunction with it.
BillSoo
06-01-2002, 04:45 PM
I haven't tried it myself....but it seems to me that the border colour is a system setting. Since it is generally not a good idea to mess with the users system colours, you would have to take over the repainting function yourself. This would mean subclassing the form and intercepting the paint message. When this message is detected, you repaint the form using your own code.
Agent
06-01-2002, 04:50 PM
How long would that take me and what would I need to
consider?
BillSoo
06-01-2002, 06:09 PM
This link might be useful....
http://www.visualbasicforum.com/showthread.php?s=&threadid=7236&highlight=drawedge
We were trying to make rounded corners. So we had to draw our own borders. I went out of my way to use the system colours for it, but if you are drawing your own colours, it's even easier.
This example uses the paint event rather than subclassing....I seem to recall that it was sufficient if you could do without a caption bar....you may yet need subclassing if you want to use the caption bar....
For subclassing help, look at The Hands tutorials here or in EliteVB.