|
-
Dec 15th, 2007, 08:34 AM
#1
Thread Starter
Frenzied Member
[RESOLVED] How to make form center display
After check the value, The height increase. How I can make the form at center display after the form height increase?
Code:
If Check5.Value = 1 Then
Frame50.Visible = True
Form41.Height = 10490
End if
-
Dec 15th, 2007, 08:38 AM
#2
Addicted Member
Re: How to make form center display
Try this:
If Check5.Value = 1 Then
Frame50.Visible = True
Form41.Height = 10490
Form41.StartUpPosition = 2
End if
-
Dec 15th, 2007, 08:40 AM
#3
Thread Starter
Frenzied Member
Re: How to make form center display
 Originally Posted by Yoosha
Try this:
If Check5.Value = 1 Then
Frame50.Visible = True
Form41.Height = 10490
Form41.StartUpPosition = 2
End if
I got this error message. What does it mean?
-
Dec 15th, 2007, 08:54 AM
#4
Addicted Member
Re: How to make form center display
Sorry .
Try this:
Me.Move (Screen.Width - Me.Width) \ 2, (Screen.Height - Me.Height) \ 2
Or this:
Me.Top = (Screen.Height * 0.85) / 2 - Me.Height / 2
Me.Left = Screen.Width / 2 - Me.Width / 2
-
Dec 15th, 2007, 09:05 AM
#5
Thread Starter
Frenzied Member
Re: How to make form center display
Ok. After check, the form go to center screen. That Fine.
How to make a form to center again, After i uncheck the checkbox
Code:
If Check5.Value = 1 Then
Frame50.Visible = True
Form41.Height = 10490
Me.Move (Screen.Width - Me.Width) \ 2, (Screen.Height - Me.Height) \ 2
Else
Frame50.Visible = False
Form41.Height = 2700
End If
-
Dec 15th, 2007, 10:25 AM
#6
Addicted Member
Re: [RESOLVED] How to make form center display
No problem, Thats work.
If Check1.Value = 1 Then
Form41.Move (Screen.Width - Form41.Width) \ 2, (Screen.Height - Form41.Height) \ 2
Frame50.Visible = False
Form41.Height = 2700
Else
Form41.Move (Screen.Width - Form41.Width) \ 2, (Screen.Height - Form41.Height) \ 2
Frame50.Visible = False
Form41.Height = 2700
End If
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
|