|
-
Oct 6th, 2000, 10:33 AM
#1
Thread Starter
Lively Member
I am using a picturebox as a container to act as a mdiparent because only 1 midparent is allowed when I need 2. When I maximize a "child" form, the title bar is still visible which enable the user to move the max form. I get an error when I set moveable=false during runtime. Is there any way to stop the maxed form from moving? Thanks.
-
Oct 6th, 2000, 10:47 AM
#2
transcendental analytic
Well you could remove the titlebar?
Use  
writing software in C++ is like driving rivets into steel beam with a toothpick.
writing haskell makes your life easier:
reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.
-
Oct 6th, 2000, 11:26 AM
#3
Thread Starter
Lively Member
If I remove the titlebar then the user can't use the 3 buttons in the titlebar to min, max, exit.
-
Oct 6th, 2000, 01:34 PM
#4
I believe this is what you want to do:
Code:
Dim iLeft As Integer
Dim iTop As Integer
Private Sub Form_Resize()
On Error Resume Next
iLeft = Me.Left
iTop = Me.Top
If Me.WindowState = vbMaximized Then
Me.Left = iLeft
Me.Top = iTop
End If
End Sub
-
Oct 6th, 2000, 03:16 PM
#5
This will remove the move command from the Form
Code:
Private Declare Function GetSystemMenu Lib "user32" (ByVal hwnd As Long, ByVal bRevert As Long) As Long
Private Declare Function RemoveMenu Lib "user32" (ByVal hMenu As Long, ByVal nPosition As Long, ByVal wFlags As Long) As Long
Private Const MF_BYPOSITION = &H400&
Private Sub Form_Load()
RemoveMenu GetSystemMenu(hwnd, 0), 1, MF_BYPOSITION
End Sub
-
Oct 11th, 2000, 12:46 PM
#6
Thread Starter
Lively Member
Matthew Gates code gives me the error: A form can't be moved or resized while minimized or maximized.
-
Oct 11th, 2000, 03:01 PM
#7
Originally posted by vbuser1
Matthew Gates code gives me the error: A form can't be moved or resized while minimized or maximized.
That is why the On Error Resume Next is there...to ignore it.
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
|