المشاركات : 14
المواضيع 6
:
: 5
الإنتساب : Jan 2019
14-02-2019, 07:39 PM
السلام عليكم
اخواني لدي مشكله اضافه الادوات داخل
function
وهذه صوره توضح المشكله
وشكراا لكم احبتي
المشاركات : 77
المواضيع 17
:
: 73
الإنتساب : Feb 2018
(14-02-2019, 07:39 PM)عبد الله اكرم كتب : السلام عليكم
و عليكم السلام و رحمة الله تعالى و بركاته
لا يمكن استعمال المكونات داخل ال Functions
اظن انك تقصد هذا :
كود :
Function MaxValue(a,b : Integer):Integer;
begin
if a > b then
result := a
else
result := b;
end;
procedure TForm1.Button1Click(Sender: TObject);
begin
edit1.text := 'Hello' + ' ' + IntToStr(MaxValue(7,11)); // call function
end;
end.
المشاركات : 334
المواضيع 83
:
: 17
الإنتساب : Feb 2008
وعليكم السلام
إما أن تضيف الإجراء ضمن class الخاص بالفورم أو تقوم بالاستدعاء عبر كامل الطرف الأبوي
PHP كود :
type
TForm1 = class(TForm)
private
{ Private declarations }
public
{ Public declarations }
function MaxValue(a, b: integer): integer;
end;
function TForm1.MaxValue(a, b: integer): integer;
begin
if a > b then
result := a
else
result := b;
Edit1.text := 'Hello';
end;
أو
PHP كود :
function MaxValue(a, b: integer): integer;
begin
if a > b then
result := a
else
result := b;
Form1.Edit1.text := 'Hello';
end;
المشاركات : 14
المواضيع 6
:
: 5
الإنتساب : Jan 2019
(14-02-2019, 08:19 PM)merouane كتب : وعليكم السلام
إما أن تضيف الإجراء ضمن class الخاص بالفورم أو تقوم بالاستدعاء عبر كامل الطرف الأبوي
PHP كود :
type
TForm1 = class(TForm)
private
{ Private declarations }
public
{ Public declarations }
function MaxValue(a, b: integer): integer;
end;
function TForm1.MaxValue(a, b: integer): integer;
begin
if a > b then
result := a
else
result := b;
Edit1.text := 'Hello';
end;
أو
PHP كود :
function MaxValue(a, b: integer): integer;
begin
if a > b then
result := a
else
result := b;
Form1.Edit1.text := 'Hello';
end;
شكرااا اخي هذا هوه المطلوب