با سلام خدمت دوستان.
برای این که بتوان رویداد onclose هر چیزی را فراخوانی کرد پارامتر اول را sender می نویسم. ولی برای پارامتر دوم که action است نمی دونم چی بنویسم. لطفا راهنمایی کنید.
ممنون
Printable View
با سلام خدمت دوستان.
برای این که بتوان رویداد onclose هر چیزی را فراخوانی کرد پارامتر اول را sender می نویسم. ولی برای پارامتر دوم که action است نمی دونم چی بنویسم. لطفا راهنمایی کنید.
ممنون
سلام
یعنی چی؟نقل قول:
پارامتر دوم که action است نمی دونم چی بنویسم
اون پاراپتر از نوع Boolean هست. و وقتی فعال باشه فرم Close نمیشه
و حتمآ باید از Process بسته بشه. کمی باهاش ور برو میفهمی.
موفق باشی
نقل قول:
اون پاراپتر از نوع Boolean هست. و وقتی فعال باشه فرم Close نمیشه
و حتمآ باید از Process بسته بشه. کمی باهاش ور برو میفهمی.
آخه فدای تو بشم این کجاش از نوع Boolean
از نوع Action است ولی بنا به گفته شما به عنوان Boolean باهاش کار کردم ولی نشد.کد:procedure TForm1.FormClose(Sender: TObject; var Action: TCloseAction);
begin
edit1.Text:='';
Edit1.SetFocus;
end;
سلامنقل قول:
کد:Occurs when the form closes.
type
TCloseAction = (caNone, caHide, caFree, caMinimize);
TCloseEvent = procedure(Sender: TObject; var Action: TCloseAction) of object;
property OnClose: TCloseEvent;
Description
Use OnClose to perform special processing when the form closes. The OnClose event specifies which event handler to call when a form is about to close. The handler specified by OnClose might, for example, test to make sure all fields in a data-entry form have valid contents before allowing the form to close.
A form is closed by the Close method or when the user chooses Close from the form's system menu.
The TCloseEvent type points to a method that handles the closing of a form. The value of the Action parameter determines if the form actually closes. These are the possible values of Action:
Value Meaning
caNone The form is not allowed to close, so nothing happens.
caHide The form is not closed, but just hidden. Your application can still access a hidden form.
caFree The form is closed and all allocated memory for the form is freed.
caMinimize The form is minimized, rather than closed. This is the default action for MDI child forms.
If a form is an MDI child form, and its BorderIcons property is biMinimize, then the default Action is caMinimize. If a MDI child form does not have these settings, the default Action is caNone, meaning that nothing happens when the user attempts to close the form.
If a form is an SDI child form, Action defaults to caHide.
To close the form and free it in an OnClose event, set Action to caFree.
Note: When the application shuts down, the main form receives an OnClose event, but any child forms do not receive the OnClose event.
فكر كنم يك گروه ديگه هم بايد به امضام اضافه كنم. كساني كه نميتوانند از راهنماي دلفي استفاده كنند.
به نظر من يه گروه ديگه اضافه كن به اسم كساني كه دكمه F1 را نمي زنند!
تو رو خدا قدر هلپ كامل و دقيق دلفي رو بدونين.
من هيچ برنامه اي نديدم كه با اين وسعت باشه و اينقدر دقيق جواب بده.
هر سوالي براتون پيش اومد كه توي Editor كلمه اي از اون وجود داره ، لطف كنين روي اون كلمه برين و F1 بزنين.
اووووووووووووووووه. چرا اینقدر دعوا می کنید. فکر کنم اگه ادم می کشتم کمتر مواخذه می شدم. غلط کردم بابا دیگه سوال نمی کنم.
خدا رو شکر که دمه دسته دوستان نیستم وگرنه معلوم نبود چه بلایی به سرم می آمد.
ولی باز هم دسته شما و Help دلفی درد نکنه.
جان من به گروه های امضایتان اضافه نکنید. می ترسم استقبال زیادی بشه لازم باشه اسم کله آدم ها رو با گروهشان بنویسید.:31: :11:
ممنون
دوست عزيز.
اين دق دلي همه بود كه يهو سر شما خالي شد.
همه اين مشكلو دارن و نميدونم چرا اينجوري ميشه.