Click here to Skip to main content
15,912,578 members
Home / Discussions / C#
   

C#

 
QuestionWeb Services Issue Pin
caksabre230-Jul-09 10:24
caksabre230-Jul-09 10:24 
AnswerRe: Web Services Issue Pin
Robin_Roy30-Jul-09 17:04
Robin_Roy30-Jul-09 17:04 
Questionimporting system.deployment Pin
Vivek Vijayan30-Jul-09 9:17
Vivek Vijayan30-Jul-09 9:17 
AnswerRe: importing system.deployment Pin
Dave Kreskowiak30-Jul-09 9:35
mveDave Kreskowiak30-Jul-09 9:35 
AnswerRe: importing system.deployment Pin
Abhishek Sur30-Jul-09 10:15
professionalAbhishek Sur30-Jul-09 10:15 
GeneralRe: importing system.deployment Pin
Vivek Vijayan30-Jul-09 22:20
Vivek Vijayan30-Jul-09 22:20 
GeneralRe: importing system.deployment Pin
Abhishek Sur30-Jul-09 23:09
professionalAbhishek Sur30-Jul-09 23:09 
QuestionScreenshot after WebBrowser Navigates Pin
VengefulSakhmet30-Jul-09 8:30
VengefulSakhmet30-Jul-09 8:30 
I'm trying to make my program take a screenshot of a webbrowser after it finishes navigating and all I seem to be able to do is take a screenshot of it before it finishes navigating (a white rectangle). It's probably something very simple that I just keep missing, but am getting too annoyed to see it.

I stepped through it and apparently it takes the screenshot when the webBrowserForScreenShot is called after Navigate has been called, but no image is present. However the url is set for the webbrowser to the address it was sent by navigate. I also tried a while loop until webBrowser.ReadyState = complete, but ended up in an infinite loop. I tried adding Application.DoEvents(); as the action in the loop and then end up with a black rectangle. Btw, it does load the page after all is said and done, just too late to be a part of the screenshot. Any help would be great!

public ScreenShotWin()
{
InitializeComponent();
openWebBrowser();
}

public void openWebBrowser()
{
webBrowser1.Navigate("http://google.com");
}

private void webBrowserForScreenShot(object sender, WebBrowserDocumentCompletedEventArgs e)
{
IntPtr htmlWindow = webBrowser1.Handle;
CaptureWindowToFile(htmlWindow, "C:\\Interbank.bmp", ImageFormat.Bmp);
}

this.webBrowser1.DocumentCompleted += new System.Windows.Forms.WebBrowserDocumentCompletedEventHandler(this.webBrowserForScreenShot);
AnswerRe: Screenshot after WebBrowser Navigates Pin
0x3c030-Jul-09 9:12
0x3c030-Jul-09 9:12 
GeneralRe: Screenshot after WebBrowser Navigates Pin
VengefulSakhmet4-Aug-09 5:22
VengefulSakhmet4-Aug-09 5:22 
QuestionCreating a updater that will download and update installation files Pin
steve_rm30-Jul-09 7:54
steve_rm30-Jul-09 7:54 
AnswerRe: Creating a updater that will download and update installation files Pin
Henry Minute30-Jul-09 8:20
Henry Minute30-Jul-09 8:20 
AnswerRe: Creating a updater that will download and update installation files Pin
Giorgi Dalakishvili30-Jul-09 8:49
mentorGiorgi Dalakishvili30-Jul-09 8:49 
QuestionAdding a Win32 resource file into VC#.NET Pin
alleyes30-Jul-09 7:13
professionalalleyes30-Jul-09 7:13 
AnswerRe: Adding a Win32 resource file into VC#.NET Pin
Dave Kreskowiak30-Jul-09 9:30
mveDave Kreskowiak30-Jul-09 9:30 
GeneralRe: Adding a Win32 resource file into VC#.NET Pin
alleyes30-Jul-09 9:43
professionalalleyes30-Jul-09 9:43 
QuestionInitialize a protocol in a BBS Pin
bigjoe11a30-Jul-09 7:05
bigjoe11a30-Jul-09 7:05 
Questionloading machine names from a txt file... Pin
partialdata30-Jul-09 6:25
partialdata30-Jul-09 6:25 
AnswerRe: loading machine names from a txt file... Pin
Abhijit Jana30-Jul-09 8:21
professionalAbhijit Jana30-Jul-09 8:21 
GeneralRe: loading machine names from a txt file... Pin
partialdata30-Jul-09 9:00
partialdata30-Jul-09 9:00 
AnswerRe: loading machine names from a txt file... Pin
CoderForEver30-Jul-09 9:08
CoderForEver30-Jul-09 9:08 
GeneralRe: loading machine names from a txt file... Pin
partialdata30-Jul-09 9:12
partialdata30-Jul-09 9:12 
GeneralRe: loading machine names from a txt file... Pin
CoderForEver30-Jul-09 9:32
CoderForEver30-Jul-09 9:32 
GeneralRe: loading machine names from a txt file... Pin
partialdata30-Jul-09 9:41
partialdata30-Jul-09 9:41 
AnswerRe: loading machine names from a txt file... Pin
Alan N30-Jul-09 10:22
Alan N30-Jul-09 10:22 

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.