Check Status Drive

In the Delphi program, we can run the Control Panel directly from the program that we created. To make a program like this follow the steps in the example below.

Example : make a form with a ComboBox and a Button. Write a program listing on Button1 onClick

procedure TF_DriveStatus.Button1Click(Sender: TObject);
begin
 begin
  if not DirectoryExists(ComboBox1.Text) then
  MessageDlg('Disk drive '+ComboBox1.text+' not ready',mtError,[mbOk],0) else
  showmessage('Drive '+ComboBox1.text+' standby');
 end;
end;

 

No comments:

Post a Comment