dalewolver wrote:
> Whats the guidelines on when to use release and when to use close. For 
> example I have a form that I want to free from another form. Should I 
> use release or should I call its close method

When you call Close, any of four different things might happen. The form 
might get destroyed, it might get minimized, it might get hidden, or it 
might do nothing at all. That's determined by the Action parameter in 
the form's OnClose event. (It's also affected by the response to the 
OnCloseQuery event.)

The default action for forms is caHide. If the form is the application's 
main form, then closing it will also terminate the program. If the form 
is an MDI child form, then the default action is caMinimize.

When you call Release, you're telling the form to free itself, but not 
right away. Instead, the form frees itself _after_ it finishes 
processing any other messages that were sent to its window. The Release 
method is most useful when you're calling it from within one of the 
form's own event handlers, such as in response to a button or menu click 
on that form.

Calling Release implies closing the form since it's going to get 
destroyed. I don't know whether OnCloseQuery and OnClose get called in 
that situation, but if they do, their responses aren't heeded. Release 
is usually compared to Free, not to Close.

-- 
Rob


------------------------ Yahoo! Groups Sponsor --------------------~--> 
<font face=arial size=-1><a 
href="http://us.ard.yahoo.com/SIG=12h6b2cmf/M=362329.6886308.7839368.1510227/D=groups/S=1705115362:TM/Y=YAHOO/EXP=1124340645/A=2894321/R=0/SIG=11dvsfulr/*http://youthnoise.com/page.php?page_id=1992
">Fair play? Video games influencing politics. Click and talk back!</a>.</font>
--------------------------------------------------------------------~-> 

-----------------------------------------------------
Home page: http://groups.yahoo.com/group/delphi-en/
To unsubscribe: [EMAIL PROTECTED] 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/delphi-en/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 



Reply via email to