Results 1 to 4 of 4

Thread: Control Size

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Sep 2000
    Posts
    116

    Exclamation

    Hi,

    How can I have a Control change its size in
    proportion to the screen?

    Thank you
    0101011001000010
    01101111011011100110110001101001011011100110010101110010

  2. #2
    Addicted Member
    Join Date
    Sep 2000
    Posts
    138
    Here is a way. Take down the measurements of your controls and your form in designing. For example:
    With frmMyForm
    .Height = 8400
    .Width = 12800
    End With
    With cmdMyButton
    .Height = 400
    .Width = 655
    End With

    Then put the following code in your form:

    Code:
    --------------------------------------------------------
    Private Sub Form_Resize()
    With cmdMyButton
    .Height = Me.ScaleHeight/8400*400
    .Width = Me.ScaleWidth/12800*655
    End With
    End Sub
    --------------------------------------------------------
    Hope it helps.

  3. #3

    Thread Starter
    Lively Member
    Join Date
    Sep 2000
    Posts
    116

    Cool Thanks!

    Thank you xmin.
    0101011001000010
    01101111011011100110110001101001011011100110010101110010

  4. #4

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