Drive list:DriveListBox
Drive1.drive = "X" set the start drive of X drive
Directory list box control:DirListBox
Dir1.path = "E:/kugou" sets the default path of the directory list box.
File list box:FileListBox
Generally, DriveListBox and DirListBox are used in combination. their respective codes are as follows:
Private sub dir1_change ()
File1.path = dir1.path
End sub
Private sub driveappschange ()
Dir1.path = drive1.drive
End sub
Public dialog box controls:
Commondialog1.action = 1 or commondialog1.showopen can all open the dialog box.
Attributes of commondialog1: File Name and path of. filename; file name of. filetitle;. filter: Set the type of file to be opened.
Private sub commandementclick ()
Dim str1 as string
Commondialog1.filter = "text file (*. txt) | *. txt"
Commondialog1.showopen
Open commondialog1.filename for input as #1
Line input #1, str1
Close 1
Form1.print str1
End sub
Flags Property setting font dialog box
Whether text. multiline allows multi-line Input. If the attribute is set to true, you can wrap it in the text box. You can also set the scroll bar style based on the scrollbars attribute. Only when the multiline attribute is true can the scrollbor attribute of the scroll bar take effect. Multiple lines in the text box are displayed. If the scrollbars attribute is set to true, multiline must be true.