procedure TForm1.ComboBox1Change(Sender: TObject);
var
total,free,sec1,byt1:LongWord;
begin
GetDiskFreeSpace(PChar(ComboBox1.Items[ComboBox1.ItemIndex]),sec1,byt1,free,total);
total:=total*sec1*byt1;
free:=free*sec1*byt1;
Edit1.Text:=FormatFloat('###,##0',total);
Edit2.Text:=FormatFloat('###,##0',free);
end;
var
total,free,sec1,byt1:LongWord;
begin
GetDiskFreeSpace(PChar(ComboBox1.Items[ComboBox1.ItemIndex]),sec1,byt1,free,total);
total:=total*sec1*byt1;
free:=free*sec1*byt1;
Edit1.Text:=FormatFloat('###,##0',total);
Edit2.Text:=FormatFloat('###,##0',free);
end;
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货