Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Windows Forms / WinForm General / February 2005

Tip: Looking for answers? Try searching our database.

Detect a form/control is not totaly drawn on the screen

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Benoist Demeure - 02 Feb 2005 09:06 GMT
Hi,

I'm using BitBlt to capture a screen-shot of a control.
It's works fine, but if the control is "masked" by an another windows, or
outside the screen bounds the captured bitmap is not complete. It's normal
because only the visible part of a control is drawn for optimizing paint.

So, before capturing the screen-shot, i want to verify that the control is
not masked by another windows ( wich can be a window from an external
application , for example the taskbar  ) .
Is there a way to do that ?
Joep - 02 Feb 2005 09:09 GMT
screen coordinates of control combined with screen itself (that is, its
height and width) will tell you

> Hi,
>
[quoted text clipped - 7 lines]
> application , for example the taskbar  ) .
> Is there a way to do that ?
Benoist Demeure - 02 Feb 2005 09:18 GMT
This is not enough : screen coordinates can help me to know if the control
is outside ( or partialy outside ) the screen.

But the main problem is to detect that the control is not masked by another
window

> screen coordinates of control combined with screen itself (that is, its
> height and width) will tell you
[quoted text clipped - 11 lines]
>> application , for example the taskbar  ) .
>> Is there a way to do that ?
Joep - 02 Feb 2005 09:24 GMT
you are right, i missed that part, sorry

when a window, or better any window of whatever proces, is partially hidden,
another window is hiding part of it, sounds logical, then, windows have
z-order and can be enumerated, their size/location asked, whether visible,
just some thoughts

> This is not enough : screen coordinates can help me to know if the control
> is outside ( or partialy outside ) the screen.
[quoted text clipped - 17 lines]
>>> application , for example the taskbar  ) .
>>> Is there a way to do that ?
Benoist Demeure - 02 Feb 2005 09:25 GMT
You mean that z-order of my window dynamicaly change when it is behind or
ahead ?
If  true, it will be helpfull to solve my problem.

> you are right, i missed that part, sorry
>
[quoted text clipped - 24 lines]
>>>> external application , for example the taskbar  ) .
>>>> Is there a way to do that ?
Joep - 02 Feb 2005 09:31 GMT
z-order is the order in which windows are stacked on top of one another as
if the display has a third dimension (next to x and y or width and height)

so yes, your window is somewhere in that z-order as are other windows, that
means you can compare z-order programmatically giving you windows that can
overlap and then for these you check their respective location/size

> You mean that z-order of my window dynamicaly change when it is behind or
> ahead ?
[quoted text clipped - 28 lines]
>>>>> an external application , for example the taskbar  ) .
>>>>> Is there a way to do that ?
Joep - 02 Feb 2005 10:40 GMT
in addition:

by the way, this pops up, I remember something about the difference between
desktop area on the one hand and screen area on the other (the latter does
not account for taskbar if I recall well), found that in the system metrics
corner or similar one day

> z-order is the order in which windows are stacked on top of one another as
> if the display has a third dimension (next to x and y or width and height)
[quoted text clipped - 36 lines]
>>>>>> an external application , for example the taskbar  ) .
>>>>>> Is there a way to do that ?

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.