DriveListBox, DirListBox, FileListBox (three ListBox) and commondialog (public dialog box Control)

Source: Internet
Author: User

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.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.