22-02-2008, 12:31 AM
السلام عليكم
تصحيحا للأخطاء
سهوا
ثم بالنسبة لأزرار *، -، + نذهب إلى Event ونختار من قائمة الخاصة بـ OnClick الإجراء BDivClick
هنا كنت برمجت بإنشاء إجراء BOper
لكن للتسهيل حافظت على BDivClick
التصحيح
فعذرا
تصحيحا للأخطاء
سهوا
إقتباس :ثم بالنسبة لأزرار *، -، + نذهب إلى Event ونختار من قائمة الخاصة بـ OnClick الإجراء BivClick
ثم بالنسبة لأزرار *، -، + نذهب إلى Event ونختار من قائمة الخاصة بـ OnClick الإجراء BDivClick
هنا كنت برمجت بإنشاء إجراء BOper
لكن للتسهيل حافظت على BDivClick
كود :
if key in ['+','-','*','/'] then
begin
if key = '+' then BOper(BAdd)
else if key = '-' then BOper(BDiff)
else if key = '*' then BOper(BMult)
else if key = '/' then BOper(BQuot);
Key := #0;
exit;
end;
if Key in ['=', #13] then
begin
BEgaleClick(BEgale);
Key := #0;
exit;
end;
if key in ['.',','] then
begin
key := DecimalSeparator;
end;
if not (Key in [#8, '0'..'9', DecimalSeparator]) then Key := #0;التصحيح
كود :
if key in ['+','-','*','/'] then
begin
if key = '+' then BDivClick(BAdd)
else if key = '-' then BDivClick(BDiff)
else if key = '*' then BDivClick(BMult)
else if key = '/' then BDivClick(BDiv);
Key := #0;
exit;
end;
if Key in ['=', #13] then
begin
BEgaleClick(BEgale);
Key := #0;
exit;
end;
if key in ['.',','] then
begin
key := DecimalSeparator;
end;
if not (Key in [#8, '0'..'9', DecimalSeparator]) then Key := #0;فعذرا

