|
-
Jan 10th, 2007, 11:02 PM
#1
Thread Starter
Hyperactive Member
Maximized Form Covers Taskbar
I used the code from http://www.vbforums.com/showpost.php...12&postcount=5 to remove the titlebar from my form and keep is resizable but whenever I maximize the window, it fills up the entire screen, covering up the taskbar. How do I stop it from doing that?
-
Jan 10th, 2007, 11:47 PM
#2
Re: Maximized Form Covers Taskbar
-
Jan 11th, 2007, 12:00 AM
#3
Thread Starter
Hyperactive Member
Re: Maximized Form Covers Taskbar
Sorry, I'm confused. What does that code do and how do I use it? Is it supposed to maximize the window properly or is it supposed to fix it so I can maximize the form correctly? Because I just used it in my form and nothing happened.
-
Jan 11th, 2007, 12:02 AM
#4
Re: Maximized Form Covers Taskbar
it finds out the area of the desktop and it sizes / positions the form to that area.
-
Jan 11th, 2007, 12:04 AM
#5
Thread Starter
Hyperactive Member
Re: Maximized Form Covers Taskbar
Do you think you could combine the two codes so they work together? Thanks
-
Jan 11th, 2007, 12:12 AM
#6
Re: Maximized Form Covers Taskbar
add the API declarations, then your form load needs to look like:
VB Code:
Private Sub Form_Load()
Dim deskRECT As RECT
Call SystemParametersInfo(SPI_GETWORKAREA, 0&, deskRECT, 0&)
With deskRECT
Me.Move .lLeft * Screen.TwipsPerPixelX, _
.lTop * Screen.TwipsPerPixelX, _
(.lRight - .lLeft) * Screen.TwipsPerPixelX, _
(.lBottom - .lTop) * Screen.TwipsPerPixelX
End With
SetWindowLong Me.hwnd, GWL_STYLE, GetWindowLong(Me.hwnd, GWL_STYLE) + WS_DLGFRAME
End Sub
-
Jan 11th, 2007, 12:12 AM
#7
Thread Starter
Hyperactive Member
Re: Maximized Form Covers Taskbar
If I have my taskbar set to autohide, then I'll just make the form's height Screen.Height-5. Now I'm just trying to figure out a short, simple code to make my form unmovable and unresizable to make the form have more of a "maximized effect".
Last edited by abazabam; Jan 11th, 2007 at 12:22 AM.
-
Jan 11th, 2007, 12:30 AM
#8
Re: Maximized Form Covers Taskbar
yes, i see where you're coming from now - and I'm afraid I don't have an answer for you, regarding the taskbar thing at least.
for your other questions, you'll probably want to check out Karl E. Peterson's FormBdr class which allows you to change various design-time only properties (such as Moveable, Sizable, etc.) at runtime.
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
|