Results 1 to 6 of 6

Thread: [RESOLVED] How to make form center display

Hybrid View

  1. #1

    Thread Starter
    Frenzied Member
    Join Date
    Feb 2007
    Location
    Malaysia
    Posts
    1,370

    Resolved [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

  2. #2
    Addicted Member
    Join Date
    Jan 2007
    Location
    Iran
    Posts
    237

    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
    Y.P.Y

  3. #3

    Thread Starter
    Frenzied Member
    Join Date
    Feb 2007
    Location
    Malaysia
    Posts
    1,370

    Re: How to make form center display

    Quote 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?
    Attached Images Attached Images  

  4. #4
    Addicted Member
    Join Date
    Jan 2007
    Location
    Iran
    Posts
    237

    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
    Y.P.Y

  5. #5

    Thread Starter
    Frenzied Member
    Join Date
    Feb 2007
    Location
    Malaysia
    Posts
    1,370

    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

  6. #6
    Addicted Member
    Join Date
    Jan 2007
    Location
    Iran
    Posts
    237

    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
    Y.P.Y

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width