|
-
Feb 7th, 2003, 09:40 PM
#1
Thread Starter
Hyperactive Member
Window Borders
I was wondering if it is possible to change the border style of a window at run-time.
Ie: I want to change a borderless window to a fixed single border window and vica versa.
VB doesn't seem to allow this...is it possible with API? Or do I have to make a new window everytime?
My reason for asking is that I have a fullscreen OpenGL app that I want to window...but I want it to have a title bar. Many VC++ apps do it, so I hoped there would be a VB way.
-
Feb 7th, 2003, 11:02 PM
#2
Frenzied Member
You call SetWindowLong(hwnd, index, value).
Since you want to do several things (border styles can be a couple of changes) look up SetWindowLong at MSDN.
the index is one of the following:
Code:
GWL_EXSTYLE Sets a new extended window style.
GWL_STYLE Sets a new window style.
GWL_WNDPROC Sets a new address for the window procedure.
GWL_HINSTANCE Sets a new application instance handle.
GWL_ID Sets a new identifier of the window.
GWL_USERDATA Sets the 32-bit value associated with the window. Each window has a corresponding 32-bit value intended for use by the application that created the window.
There are a LOT of constants that you can place in the value argument, and they depend on what the window currently is,
what the index is.
Go to MSDN or www.allapi.net for more information.
-
Feb 8th, 2003, 08:14 PM
#3
Thread Starter
Hyperactive Member
Thanks for your help...I'll look into it (I'll probably come running back for more help though  )
-
Feb 9th, 2003, 04:18 AM
#4
There's a thread here with all the code for changing a form borderstyle at runtime - look at the code down near the bottom of the thread..
HTH,
Duncan
-
Feb 9th, 2003, 09:29 AM
#5
Thread Starter
Hyperactive Member
Thanks....that's exactly what I needed
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
|