Source code Auto Resize dan Auto Position
Source code berikut untuk menyesuaikan object-object form baik itu ukurannya maupun lokasinya saat form di resize atau maximize.
Buat 1 project dengan :
1 Form
1 Frame
1 ListView
1 CommandButton
1 StatusBar
Copy source code berikut pada Form :
Ini TIDAK menggunakan ocx atau komponen lainya, ini hanya memanfaatkan event Form_Resize dan mengatur property Left, Top, Width dan High dari masing masing object form tersebut.
DOWNLOAD Full Source Project
Buat 1 project dengan :
1 Form
1 Frame
1 ListView
1 CommandButton
1 StatusBar
Copy source code berikut pada Form :
Private Sub Form_Resize()
If Me.WindowState = 1 Then Exit Sub 'jika minimize
With Frame1
.Left = 0
.Top = 0
.Width = Me.ScaleWidth
End With
With ListView1
.Left = Frame1.Left
.Top = Frame1.Top + Frame1.Height + 5 'jarak = 5
.Width = Frame1.Width
.Height = Me.ScaleHeight - (.Top + StatusBar1.Height + Command1.Height)
End With
With Command1
.Left = Me.ScaleWidth - .Width
.Top = ListView1.Top + ListView1.Height
End With
End Sub
Ini TIDAK menggunakan ocx atau komponen lainya, ini hanya memanfaatkan event Form_Resize dan mengatur property Left, Top, Width dan High dari masing masing object form tersebut.
DOWNLOAD Full Source Project

