0

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.

2
Contributors
6
Replies
7
Views
5 Years
Discussion Span
Last Post by QVeen72
0

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

0

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

0

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

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.