بعد عدة محاولات وجدت إني ساأستخدم التابع DiskSize عشان أخذ الحجم كالتالي
<BLOCKQUOTE> <font> كود: </font> <div align="ltr"> <center> <table border="0" width="80%" dir="ltr" bgcolor=="#000000"> <tr> <td width="100%"> <pre> <font color="#ffffff">
function DiskSize(Drive: Byte): Int64;
begin
disksize :=drive ;
end;
</font> </pre> </td> </tr> </table> </center> </div> </BLOCKQUOTE>
حيث أن النمط بايت وخليت القيمة المعادة من نمط integer64 عشان العدد ممكن إنه ينقرى لأنه بيكون كبير وفي نفس الوقت أسهل إنها تكون عدد صحيح المهم خذ هذا المثال الكامل كيف أستخدم هذا التابع
<BLOCKQUOTE> <font> كود: </font> <div align="ltr"> <center> <table border="0" width="80%" dir="ltr" bgcolor=="#000000"> <tr> <td width="100%"> <pre> <font color="#ffffff">
function DiskSize(Drive: Byte): Int64;
begin
disksize := drive ;
end;

procedure TForm1.Button2Click(Sender: TObject);
var
b : byte ;
begin
edit1.text := inttostr(disksize(b));
end;
</font> </pre> </td> </tr> </table> </center> </div> </BLOCKQUOTE>
أما بالنسبة للمتبقي من الهارد ديسك أستخدم هذا الفنكشن ونفس الطريقة
<BLOCKQUOTE> <font> كود: </font> <div align="ltr"> <center> <table border="0" width="80%" dir="ltr" bgcolor=="#000000"> <tr> <td width="100%"> <pre> <font color="#ffffff">
function DiskFree(Drive: Byte): Int64;
</font> </pre> </td> </tr> </table> </center> </div> </BLOCKQUOTE>
أنا جربته ونفع لكن مادري إذا كان في خطأ علىالله أعلم
لذلك أرجو تجريبه والتعقيب .
--------------------------
أرجو أن وفقت في شرح هذ المثال
@.@
hotpage@maktoob.com


------------------
في غربتي تغرب النور عن عيني وش حاجتي في نور عين غاب غاليها

[b]<small><small>[ تم تعديل الموضوع بواسطة   Moon Ray   يوم   22-06-2000]

[b]<small><small>[ تم تعديل الموضوع بواسطة &nbsp; Moon Ray &nbsp; يوم &nbsp; 22-06-2000]