Judging whether there is a floppy disk in the floppy drive

xiaoxiao2021-03-06  41

Method 1: IF Disksize (1) = - 1 THEN / / 1, 2, 3 .... represents A, B, C ... Drive, respectively

ShowMessage ('Drive A: Not ready ") Else ShowMessage (' Drive A: Ready '); Method 2: (View Remaining Space) Function TFORM1.ISDiskReady (Drive: char): Boolean; VAR D1, D2, D3, D4: longword; drivepath: array [0..3] of char; begin drivepath: = 'a: /'; drivepath [0]: = drive; result: = getDiskFreespace (DrivePath, D1, D2, D3, D4); Endton1click (sender: TOBJECT); Begin if not isdiskready ('a') Then ShowMessage ('driver A is not ready ") Else ShowMessage (' drive A is ready";

转载请注明原文地址:https://www.9cbs.com/read-57019.html

New Post(0)