Home All Groups Group Topic Archive Search About

Check if a form or control is visible in Desktop (to the user)

Author
7 Feb 2006 2:21 PM
samnospam@nospam.nospam
Hello,

I want to know if a form is visible in the Desktop and the user can see it.
The property Visible is true although other program is over the form, so this
property don't solve the problem.

Thanks.
Author
7 Feb 2006 5:59 PM
Nkem
How about the activate property. First you can check to see if it is opened,
then when you activate it, it would come to the top.

frm.Activate();


Show quoteHide quote
"samnospam@nospam.nospam" wrote:

> Hello,
>
> I want to know if a form is visible in the Desktop and the user can see it.
> The property Visible is true although other program is over the form, so this
> property don't solve the problem.
>
> Thanks.
Are all your drivers up to date? click for free checkup

Author
7 Feb 2006 6:21 PM
Peter Oliphant
If you mean you want to know if any part of the form is visible in the sense
that it isn't being covered up by other applicatons, I believe this is not a
simple problem. After all, a single pixel of your form being visible
violates the condition! How do you deal with translucentcy of other forms?
If it is 'almost' opaque (say, alpha = 255-1) is what's underneath
'visible'?

I think you would need to find all applications running, get their forms
(some may have more than one), find their locations and size, check for
translucentcy, compare against the dimensions and locations of your form,
and your form if visible if it meets all the above conditions...

Not sure what you need this for, but that's my 2 cents...

[==P==]

<samnospam@nospam.nospam> wrote in message
Show quoteHide quote
news:5B830088-0B13-4280-B803-C2F07D531CD2@microsoft.com...
> Hello,
>
> I want to know if a form is visible in the Desktop and the user can see
> it.
> The property Visible is true although other program is over the form, so
> this
> property don't solve the problem.
>
> Thanks.
Author
22 Feb 2006 9:11 AM
samnospam@nospam.nospam
I'm looking for something like a windows message or notification, for example
a message received through WndProc.

Thanks.

Show quoteHide quote
"samnospam@nospam.nospam" wrote:

> Hello,
>
> I want to know if a form is visible in the Desktop and the user can see it.
> The property Visible is true although other program is over the form, so this
> property don't solve the problem.
>
> Thanks.

Bookmark and Share