Massassi Forums Logo

This is the static archive of the Massassi Forums. The forums are closed indefinitely. Thanks for all the memories!

You can also download Super Old Archived Message Boards from when Massassi first started.

"View" counts are as of the day the forums were archived, and will no longer increase.

ForumsDiscussion Forum → VBasic window control question
VBasic window control question
2004-03-12, 7:00 AM #1
Is there a way to adjust the properties of a form in VBasic so that it's possible to maximize/minimize the window, yet not not warp its borders? As it stands, I can achieve part of the desired effect by setting BorderStyle to 1, but the form then loses the ability to minimize/maximize.

------------------
"LC Tusken: the idiot is the person who follows the idiot and your not following me your insulting me your following the path of a idiot so that makes you the idiot"
NMGOH || Jack Chick preaches it
the idiot is the person who follows the idiot and your not following me your insulting me your following the path of a idiot so that makes you the idiot - LC Tusken
2004-03-12, 8:08 AM #2
Not the best way of doing things but here:

Code:
Dim blnMax As Boolean

Private Sub Form_Resize()
    If Me.WindowState = vbMaximized Then
        Me.WindowState = vbNormal
        If blnMax = False Then
            Me.Top = 0
            Me.Left = 0
            Me.Width = Screen.Width
            Me.Height = Screen.Height - 500
            blnMax = True
        Else
            'put it back where you want it
            Me.Top = 2000
            Me.Left = 1000
            Me.Height = 3600
            Me.Width = 4800
            blnMax = False
        End If
    End If
End Sub


I don't think theres's a way to do what you want other then that. Why are you wanting to do that anyway?

------------------
http://www.sporkaudio.com
gbk is 50 probably

MB IS FAT
2004-03-12, 8:55 AM #3
Just a personal preference. But if it's going to be that much code... [http://forums.massassi.net/html/eek.gif]

------------------
"LC Tusken: the idiot is the person who follows the idiot and your not following me your insulting me your following the path of a idiot so that makes you the idiot"
NMGOH || Jack Chick preaches it
the idiot is the person who follows the idiot and your not following me your insulting me your following the path of a idiot so that makes you the idiot - LC Tusken
2004-03-12, 1:12 PM #4
Yeah it's not something that would be easy, I just coded that up real quick to see how it would work.

------------------
http://www.sporkaudio.com
gbk is 50 probably

MB IS FAT
2004-03-12, 6:12 PM #5
Hmm. I have a program that acts exactly like you describe currently, so it's certainly possible.

Have you set the Controlbox, MinButton and MaxButton properties to True? That combined with BorderStyle = 1 should do it, I'd reckon.
2004-03-12, 7:09 PM #6
Nope. It doesn't like Form1.Maxbutton = True.

------------------
"LC Tusken: the idiot is the person who follows the idiot and your not following me your insulting me your following the path of a idiot so that makes you the idiot"
NMGOH || Jack Chick preaches it
the idiot is the person who follows the idiot and your not following me your insulting me your following the path of a idiot so that makes you the idiot - LC Tusken
2004-03-12, 11:21 PM #7
No, I mean, set it on the properties page which is usually found in the lower right corner of the screen...

What version of VB are you using? I have no idea if it isn't version 5 (or 6, since they're almost exactly the same).

↑ Up to the top!