Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Driveselect Control
Message
From
03/06/2008 02:21:35
 
 
To
03/06/2008 00:55:55
Ransome So
Ransome's Workshop
Hong Kong, Hong Kong
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows XP SP2
Miscellaneous
Thread ID:
01321203
Message ID:
01321208
Views:
13
>Dear all,
>
>At past, I use a third party class driveselect in my project which is a combobox list out the drives in the machine. By selecting the appropiate drive for data backup and restore. However, recently, I find some abnormal that the listing of drive is wrong that a: for floppy/ c: for USB flash drive.
>
>Do I have any alternative solution ?
Hi Ransome,

You can use Vfp's DriveType() function (or external tools like WSH or WMI)
Local i,c
FOR i = ASC('A') TO ASC('Z')
    c = Chr(i)
    && If DriveType(c) > 1
    ? c,DRIVETYPE(c), DISKSPACE(c)
NEXT
hth
-Stefan
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform