Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Change a form's height

Status
Not open for further replies.

jamaarneen

Programmer
Dec 27, 2007
213
BE

Hi,

How could I change during run-time the form's actual Height?

I tried to change the form's 'Form header.Height' & 'Detail.Height' but the form stayed the same.

Thanks in advance
Ja
 
Change the InsideHeight property.

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 

Thanks PHV

because the InsideHeight is in twips, while my eye is more used to Centimeters, I made a function to convert 1 Cm to twips.
I'm just wondering, aren't there already a function like that from Microsoft?

BTW, are ALL size values in twips for VBA?

ja

 
How are ya jamaarneen . . .

Its just a little math. Here's a function that will perform both conversions. The type conversion (twips to centimeters or centimeters to twips) is determined by the [blue]flg[/blue] arguement when you call the function:
Code:
[blue]Public Function TwipsCentimeters(Dat As Double, flg As Boolean)
   [green]'Twips = 1 = convert Dat to Twips
   'Twips = 0 = convert Dat to Centimeters[/green]
   
   If flg Then
      TwipsCentimeters = 1440 * Dat / 2.54
   Else
      TwipsCentimeters = Int(2.54 * Dat / 1440)
   End If
   
End Function[/blue]

See Ya! . . . . . .

Be sure to see thread181-473997 [blue]Worthy Reading![/blue] [thumbsup2]
Also faq181-2886 [blue]Worthy Reading![/blue] [thumbsup2]
 
So sorry jamaarneen . . .

Code:
[blue]Public Function TwipsCentimeters(Dat As Double, flg As Boolean)
   [green]'flg = 1 = convert Dat to Twips
   'flg = 0 = convert Dat to Centimeters[/green]
   
   If flg Then
      TwipsCentimeters = 1440 * Dat / 2.54
   Else
      TwipsCentimeters = Int(2.54 * Dat / 1440)
   End If
   
End Function[/blue]

See Ya! . . . . . .

Be sure to see thread181-473997 [blue]Worthy Reading![/blue] [thumbsup2]
Also faq181-2886 [blue]Worthy Reading![/blue] [thumbsup2]
 

Thanks AceMan1 (I'm not really in town these days...)

The function I wrote myself isn't that accurate, but I think it's OK too. I just multiplied (or divide) by 567

Ja

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top