Results 1 to 19 of 19

Thread: Resizeable VB6 UserForms (and Unicode Form Captions)

Threaded View

  1. #14
    Fanatic Member
    Join Date
    Aug 2016
    Posts
    609

    Re: Resizeable VB6 UserForms (and Unicode Form Captions)

    Quote Originally Posted by xxdoc123 View Post
    Code:
    If HeightPerCent > 0 Then H = -HeightPerCent & Screen.Height / 100! Else H = OHeight * -HeightPerCent / 100!
    what this mean?
    He already explained:
    ' Centers the form onscreen.
    ' If WidthPerCent > 0 then value is the width of the form relative to the width of the screen.
    ' For example, 65 says make the form centered ont he screen with the width 65% of the
    ' screen regardless of the size and resolution of the screen.
    ' If WidthPerCent is < 0 then it is assumed that the negative of the value is the % multiplier
    ' of the original form size. For example, -200 says make the width 200% of the original form.
    ' HeightPerCent is the same as WidthPerCent except (obviously) it is for height, not width.
    ' Note that if KeepRatio is True then the height setting is ignored and it is set to whatever
    ' necessary to maintain the original height:width ratio.
    ' If Limit2Screen is True then the dimensinos might be adjusted to keep the form totally onscreen.
    Code:
       If HeightPerCent > 0 Then
          H = -HeightPerCent & Screen.Height / 100!
       Else
         H = OHeight * -HeightPerCent / 100!
       End If
    '! means Single
    Last edited by DaveDavis; Jul 30th, 2018 at 08:20 PM.

Tags for this Thread

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