| View previous topic :: View next topic |
| Author |
Message |
Jens Gruschel Guest
|
Posted: Sun Nov 16, 2003 6:34 pm Post subject: TCustomControl visible? |
|
|
Hello,
I wrote some TCustomControl descentant, which does some animation (using a
timer). Now of course the timer does not have to fire while the control is
not visible, because the parent window is minimized or another one than the
parent tabsheet is active on a page control. Any ideas?
Jens
|
|
| Back to top |
|
 |
Kurt Barthelmess Guest
|
Posted: Sun Nov 16, 2003 8:40 pm Post subject: Re: TCustomControl visible? |
|
|
"Jens Gruschel" <nospam (AT) pegtop (DOT) net> wrote:
| Quote: | I wrote some TCustomControl descentant, which does some animation (using a
timer). Now of course the timer does not have to fire while the control is
not visible, because the parent window is minimized or another one than the
parent tabsheet is active on a page control. Any ideas?
|
IsWindowVisible(Handle) will handle the minimized case. The problem of
being covered is a bit more problematic. What if the thing "covering"
you is transparent?
Good luck.
Kurt
|
|
| Back to top |
|
 |
Jens Gruschel Guest
|
Posted: Sun Nov 16, 2003 9:49 pm Post subject: Re: TCustomControl visible? |
|
|
| Quote: | IsWindowVisible(Handle) will handle the minimized case. The problem of
being covered is a bit more problematic. What if the thing "covering"
you is transparent?
|
Thanks! I don't want to handle any covering (I'm aware of this problem and I
leave it to the user). But an inactive tabsheet is another case, or am I
missing something? I just want the animation to stop if someone minimizes
the form or selects another tab (since I want to put my control on a
tabsheet). Is it possible? (if not, I guess the pagecontrol itself must
start / stop the animation)
Jens
|
|
| Back to top |
|
 |
Jens Gruschel Guest
|
Posted: Sun Nov 16, 2003 9:52 pm Post subject: Re: TCustomControl visible? |
|
|
| Quote: | IsWindowVisible(Handle) will handle the minimized case. The problem of
being covered is a bit more problematic. What if the thing "covering"
you is transparent?
Thanks! I don't want to handle any covering (I'm aware of this problem and
I
leave it to the user). But an inactive tabsheet is another case, or am I
missing something? I just want the animation to stop if someone minimizes
the form or selects another tab (since I want to put my control on a
tabsheet). Is it possible? (if not, I guess the pagecontrol itself must
start / stop the animation)
|
I just found that IsWindowVisible does exactly what I need. Thanks again!
Jens
|
|
| Back to top |
|
 |
Jens Gruschel Guest
|
Posted: Sun Nov 16, 2003 10:03 pm Post subject: Re: TCustomControl visible? |
|
|
| Quote: | I just found that IsWindowVisible does exactly what I need. Thanks again!
|
It's me again. There isn't by chance a message sent around when
IsWindowVisible changes? (since I guess the function recursively checks the
visible state of the parent windows, the answer probably is no, but since
asking makes so much wiser I do it)
Jens
|
|
| Back to top |
|
 |
Kurt Barthelmess Guest
|
Posted: Mon Nov 17, 2003 12:02 am Post subject: Re: TCustomControl visible? |
|
|
"Jens Gruschel" <nospam (AT) pegtop (DOT) net> wrote:
| Quote: | I just found that IsWindowVisible does exactly what I need. Thanks again!
It's me again. There isn't by chance a message sent around when
IsWindowVisible changes? (since I guess the function recursively checks the
visible state of the parent windows, the answer probably is no, but since
asking makes so much wiser I do it)
|
Not that I know of. Fire up Winsight and see what messages go to your
window.
Good luck.
Kurt
|
|
| Back to top |
|
 |
|