Board index » cppbuilder » Re: Stay on top problem

Re: Stay on top problem


2004-05-21 02:22:11 AM
cppbuilder18
Quote
You should not be using the OnCreate event:
use the constructor instead. However, allocating the form there
(in the constructor or OnCreate for that matter) means that the
form instance is always allocated which means that you have a
potential memory leak unless you add a destructor to the main
form where you delete form2.
Fixed, I create it in the constructor and delete it in the destructor.
Quote
That doesn't look right. You're missing a 'T'
Yes that was just to show how I did it, in my program I have other names on
the forms.
Quote
Do not call Free directly. Use delete instead and that should
be moved to the destructor instead.
Fixed
Quote
You're making it more complicated than you need to trying to
simplify my example. You need to go back in this thread and
look at how I showed allocating the form and using caFree in
the OnClose event to delete it.
The reason I didnt do it like that is that I don't want to delete the form
until the main program exit, so what you wrote at the top seems to be
just what I need.
Thanks again!
/Jonas
 
 

Re:Re: Stay on top problem

Hi there
I had a meltdown on my PC and after that my Eudora mailprogram
is always on top.
There is no setting in the app for stay on top, so I was thinking
that I could make a little app that get a handle to eudora and
then tell it to NOT stay on top. and hopefylly it will remember
it next time its run.
Can that be don and how ?
Thanks in advance
Asger