hi, im using a file1 object for list the files inside a directory.
when i set the file1.font.size the file1.height changes. there is a way for keep the file1.height equal to the form1.height even if the font size changes ??

thanks in advance.

Recommended Answers

All 6 Replies

Hi,

After Changing Font Size, again change File1's height..

Regards
Veena

Or after changing Fon size, make Form's height equal to File's height...

where is the error ?

Private Sub Command1_Click()
Dim file1height As Integer
Dim form1height As Integer
File1.Top = 0
File1.Left = 0

file1height = File1.Height

form1height = Form1.Height

File1.FontSize = 99

If File1.Height < Form1.Height Then
File1.Height = File1.Height * 2
End If

File1.Height = Form1.Height

End Sub

Hi,

Why you want fontsize of 99 ...?
Try This Code:

File1.Top = 0
File1.Left = 0
If File1.Height < 2500 Then
    File1.Height = 2500
End If
If Me.Height < 2500 Then
    Me.Height = 2500
End If
File1.Font.Size = 99
File1.Height = Me.Height
Me.Height = File1.Height + 300  '300 For Title bar

Regards
Veena

thanks! i dont know what is me.height but it works even. thanks very much for help.

Hi,

"Me" is Form...
Me.Height is Form's Height..

Regards
Veena

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.