|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Refresh drive, dir and file controls
I have developed an app that uses the drive, dir and file controls so that I can read what is on a CD through the drive. I need some help to get my program to refresh automatically [like windows automatically does in explorer] so that when I insert a different CD, it is not necessary to have the user do anything. i.e. the program automatically reads the CD in the drive and updates the drive, dir and file controls.
Thanks. jb |
|
#2
|
|||
|
|||
|
U can use this function to judge which drive is CD-Rom:
Private Declare Function GetDriveType Lib "kernel32" Alias "GetDriveTypeA" (ByVal nDrive As String) As Long Private Sub Form_Load() 'KPD-Team 1998 'URL: http://www.allapi.net/ 'E-Mail: KPDTeam@Allapi.net 'Set the graphic mode to persistent Me.AutoRedraw = True 'Get information about the C:\ Select Case GetDriveType("C:\") Case 2 Me.Print "Removable" Case 3 Me.Print "Drive Fixed" Case Is = 4 Me.Print "Remote" Case Is = 5 Me.Print "Cd-Rom" Case Is = 6 Me.Print "Ram disk" Case Else Me.Print "Unrecognized" End Select End Sub And use timer to detect CD-Rom Drive's content by read it or list directory for ensuring whether this drive is ready!..If it is ready to work,U can read the CD in the drive and update the drive, dir and file controls |
![]() |
| Viewing: Dev Shed Forums > Programming Languages - More > Visual Basic Programming > Refresh drive, dir and file controls |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|