انت هنا الان : شبكة جامعة بابل > موقع الكلية > نظام التعليم الالكتروني > مشاهدة المحاضرة

The Drive ListBox

الكلية كلية هندسة المواد     القسم قسم هندسة السيراميك ومواد البناء     المرحلة 2
أستاذ المادة رلا سامي خضير عباس العيسى       16/12/2016 23:21:05
The Drive ListBox
Is used to display a list of drives available in your computer. When you place this control into the form and run the program, you will be able to select different drive from your computer.
The Dir ListBox
is Directory ListBox is used to display the list of directories or folder in a selected drive. When you place this control into the form and run the program, you will be able to select different directories from a selected drive in your computer.
The File ListBox
The File ListBox is used to display the list of files in a selected directory or folder. When you place this control into the form and run the program, you will be able to a list of files in a selected directory.
if Pattern = *.* showing all files.
if Pattern = *. bmp;*.gif;*.jpg showing only picture files. if Pattern = *. mp3;*.wav showing only audio files.
if Pattern = *. mp4;*.avi;*.wmv showing only video files.
2
Visual Basic 6 lecture البرمجة بلغة فيجول 6 : المحاضرة الحاديةعشر 11
Example1: showing Drive ListBox, DirListBox and File ListBox.
Solution:
Code:
Drive1:
Private Sub Drive1_Change() Dir1.Path = Drive1.Drive End Sub
Dir1:
Private Sub Dir1_Change() File1.Path = Dir1.Path End Sub
We can find the Drive, File and Directory depending on a code, for example just insert a Command Button in the figure above then write the code below:
Drive1.Drive = "e:\"
OR
Dir1.Path = "c:\windows"
OR
File1.Path = "f:\"
3
Visual Basic 6 lecture البرمجة بلغة فيجول 6 : المحاضرة الحاديةعشر 11
Must be Click
Example2: showing Drive ListBox, DirListBox and display an image according to the File ListBox.

المادة المعروضة اعلاه هي مدخل الى المحاضرة المرفوعة بواسطة استاذ(ة) المادة . وقد تبدو لك غير متكاملة . حيث يضع استاذ المادة في بعض الاحيان فقط الجزء الاول من المحاضرة من اجل الاطلاع على ما ستقوم بتحميله لاحقا . في نظام التعليم الالكتروني نوفر هذه الخدمة لكي نبقيك على اطلاع حول محتوى الملف الذي ستقوم بتحميله .