1.我想做个自动读取驱动器盘符,该如何实现,请各位帮帮!
解决方案 »
- Delphi 指针问题
- dll中如何控制主窗体状态呢?
- 服务程序的问题
- Report Machine 中chart中如何动态画图
- 是否有方法将一个文件写入到图像中(不影响图像浏览),今天没分了,下次加
- >请教有关窗口调用的问题(新手)?<
- 我用QuickRep控件,不用Query控件连接,怎么才能通过循环自己控制报表打印?
- 如何显示一个表的某个字段?
- delphi6.0数据库开发实例导航这本书怎么样?
- 动态报表疑问!(呵呵。没分,只有这么多,别闲少!)
- 我的程序怎么运行这么慢,如何提高程序运行速度呢?现在有4个for循环,它的结构如下-----------请高手指点
- 请教各位高手 怎样屏蔽掉Memo控件的键盘事件
Windows.PasSyntax
GetDriveType(
lpRootPathName: PChar {a pointer to the root path string}
): UINT; {returns a value based on the drive type}Description
GetDriveType is used to determine the type of drive being accessed, and will indicate fixed, removable, or remote (network) drives.Parameters
lpRootPathName: A null terminated string containing the root directory of the drive to be queried. If this parameter is NIL, the function uses the root of the current directory.Return Value
If the function is successful, it returns one value, otherwise it returns DRIVE_UNKNOWN.The Tomes of Delphi 3: Win32 Core API Help File by Larry Diehlprocedure TForm1.DriveComboBox1Change(Sender: TObject);
var
DrivePath: array[0..3] of char; // holds the root directory to query
begin
{assemble the name of the root path of the drive to query}
StrPCopy(DrivePath, DriveComboBox1.Drive);
StrCat(DrivePath, ':\'); {retrieve the drive type and display it}
case GetDriveType(DrivePath) of
DRIVE_UNKNOWN: Panel1.Caption := 'No Type Information'; DRIVE_NO_ROOT_DIR: Label1.Caption := 'Root Directory does not exist';
DRIVE_REMOVABLE: Panel1.Caption := 'Removable';
DRIVE_FIXED: Panel1.Caption := 'Fixed';
DRIVE_REMOTE: Panel1.Caption := 'Remote';
DRIVE_CDROM: Panel1.Caption := 'CDROM';
DRIVE_RAMDISK: Panel1.Caption := 'RamDisk';
end;
end;The Tomes of Delphi 3: Win32 Core API Help File by Larry Diehl