须调用 Windows API 的 GetDriveType ,首先 声 明 以 下 API : Declare Function GetDriveType Lib "kernel32" Alias _ "GetDriveTypeA" (ByVal nDrive As String) As Long 然后将以上的声明放在.bas的一般模块中,如果放在 Form 之中, 须在Declare之前再加上 Private。 然后使用以下叙述调用 : ret = GetDriveType ( "D:\") 若传回值 ret 等于 5 , 即表示 "D:\" 为光碟机 , 至于其他传回值的意义则是 : 2:软碟, 3:硬碟, 4:Server端磁碟, 6:RAMDISK。