Click here to Skip to main content
15,899,025 members
Home / Discussions / C#
   

C#

 
GeneralRe: WebBrowser help Pin
Simon Wren18-Mar-04 2:24
professionalSimon Wren18-Mar-04 2:24 
GeneralRe: WebBrowser help Pin
Dave Kreskowiak18-Mar-04 3:25
mveDave Kreskowiak18-Mar-04 3:25 
GeneralRe: WebBrowser help Pin
Heath Stewart18-Mar-04 5:00
protectorHeath Stewart18-Mar-04 5:00 
GeneralRe: WebBrowser help Pin
Simon Wren18-Mar-04 6:10
professionalSimon Wren18-Mar-04 6:10 
GeneralRe: WebBrowser help Pin
Dave Kreskowiak18-Mar-04 7:14
mveDave Kreskowiak18-Mar-04 7:14 
GeneralRe: WebBrowser help Pin
Heath Stewart18-Mar-04 7:17
protectorHeath Stewart18-Mar-04 7:17 
GeneralGetting an Image of a window Pin
T i T i18-Mar-04 1:03
T i T i18-Mar-04 1:03 
GeneralRe: Getting an Image of a window Pin
Heath Stewart18-Mar-04 4:57
protectorHeath Stewart18-Mar-04 4:57 
You actually don't need to capture the screen to get the window, which would require the window to be active so you see it all. Instead of getting the desktop window (a la GetDesktopWindow or something), get the window handle and basically do the same thing. In C#, you can do this easily by enumerating the processes from Process.GetProcesses, find the right process, and then get the main window handle using Process.MainWindowHandle.

This still doesn't change the fact that the window needs to be active (i.e., in the foreground) to get the entire image. Windows (a window manager) draws a 2D surface and nothing more. While a window appears to be "behind" another, it's actually just that the foreground window is being painted in place of the "hidden" regions. In order to accomplish what you want, you'd have to create a virtual frame buffer of sorts in which the window would be paintined in its entirety instead of to the screen buffer, which is all but trivial and would still pose problems (believe me, it's not an easy thing - especially in higher-level languages like C3 and others that target the CLR).

 

Microsoft MVP, Visual C#
My Articles
GeneralRe: Getting an Image of a window Pin
Jeremy Kimball18-Mar-04 7:31
Jeremy Kimball18-Mar-04 7:31 
GeneralNFA to DFA Pin
angelayoub18-Mar-04 0:57
angelayoub18-Mar-04 0:57 
GeneralRe: NFA to DFA Pin
Mazdak18-Mar-04 1:23
Mazdak18-Mar-04 1:23 
GeneralRe: NFA to DFA Pin
Heath Stewart18-Mar-04 4:44
protectorHeath Stewart18-Mar-04 4:44 
GeneralRe: NFA to DFA Pin
Werdna18-Mar-04 6:22
Werdna18-Mar-04 6:22 
GeneralRe: NFA to DFA Pin
Jeremy Kimball18-Mar-04 7:32
Jeremy Kimball18-Mar-04 7:32 
GeneralRe: NFA to DFA Pin
Heath Stewart18-Mar-04 9:05
protectorHeath Stewart18-Mar-04 9:05 
GeneralTo build MDI application Pin
Inpreet Singh18-Mar-04 0:48
Inpreet Singh18-Mar-04 0:48 
GeneralRe: To build MDI application Pin
Dave Kreskowiak18-Mar-04 1:12
mveDave Kreskowiak18-Mar-04 1:12 
GeneralRe: To build MDI application Pin
Inpreet Singh18-Mar-04 1:27
Inpreet Singh18-Mar-04 1:27 
GeneralRe: To build MDI application Pin
Dave Kreskowiak18-Mar-04 6:02
mveDave Kreskowiak18-Mar-04 6:02 
GeneralRe: To build MDI application Pin
Heath Stewart18-Mar-04 4:43
protectorHeath Stewart18-Mar-04 4:43 
GeneralBPEL4WS Pin
shanaka18-Mar-04 0:48
shanaka18-Mar-04 0:48 
GeneralRe: BPEL4WS Pin
John Fisher18-Mar-04 4:39
John Fisher18-Mar-04 4:39 
Questioncan you solve this? plesa help Pin
Snowjim18-Mar-04 0:16
Snowjim18-Mar-04 0:16 
AnswerRe: can you solve this? plesa help Pin
Corinna John18-Mar-04 1:33
Corinna John18-Mar-04 1:33 
AnswerRe: can you solve this? plesa help Pin
Heath Stewart18-Mar-04 4:39
protectorHeath Stewart18-Mar-04 4:39 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.