Click here to Skip to main content
14,427,818 members

.NET Framework

 
GeneralRe: Breakpoint will not currently be hit Pin
TeachesOfPeaches9-Mar-07 12:54
MemberTeachesOfPeaches9-Mar-07 12:54 
QuestionWebConfig Section for .NET Framework 3.0 Pin
Vasudevan Deepak Kumar7-Mar-07 11:47
MemberVasudevan Deepak Kumar7-Mar-07 11:47 
QuestionSockets issue, how to listen to UDP socket for multiple instances Pin
nsutanto7-Mar-07 11:36
Membernsutanto7-Mar-07 11:36 
QuestionMultithreading Local Variables Pin
MikeMarq7-Mar-07 9:09
MemberMikeMarq7-Mar-07 9:09 
AnswerRe: Multithreading Local Variables Pin
Leslie Sanford7-Mar-07 9:21
MemberLeslie Sanford7-Mar-07 9:21 
GeneralRe: Multithreading Local Variables Pin
MikeMarq7-Mar-07 11:49
MemberMikeMarq7-Mar-07 11:49 
AnswerRe: Multithreading Local Variables Pin
arcticbrew7-Mar-07 20:19
Memberarcticbrew7-Mar-07 20:19 
QuestionDo Events causing overflow Pin
earlgraham7-Mar-07 9:04
Memberearlgraham7-Mar-07 9:04 
I’m writing a C# DLL that executes a web browser. I have to grab a static image when the browser is done updating. So I wrote the following code.
public string SaveImageToFile()
 {
   int done = 0;
   String file = "";
   while (done < 20)
   {
     if (((webbrowser1.IsBusy == false) && (webbrowser1.ReadyState == WebBrowserReadyState.Complete)) || (done == 19))
     {
       Bitmap docImage = new Bitmap(webbrowser1.Width, webbrowser1.Height);
       webbrowser1.DrawToBitmap(docImage, new Rectangle(webbrowser1.Location.X,
               webbrowser1.Location.Y, webbrowser1.Width, webbrowser1.Height));
       file = "C:\\Rumper\\tempA" + num + ".bmp";
       docImage.Save(file, System.Drawing.Imaging.ImageFormat.Bmp);
       ++num;
       done = 20;
     }
     else
     {
       System.Threading.Thread.Sleep(100);
       Application.DoEvents();
       ++done;
     }
   }
   return file;
 }

However when I call SaveImageToFile from my MFC application, I get a stackoverflow. If I comment out the DoEvents. No stack overflow and no image.
I need to replace DoEvents, but I’m not sure what would be a better method.

Thanks

Programmer
Glenn Earl Graham
Austin, TX

AnswerRe: Do Events causing overflow Pin
Scott Page7-Mar-07 13:46
professionalScott Page7-Mar-07 13:46 
GeneralRe: Do Events causing overflow Pin
earlgraham8-Mar-07 12:46
Memberearlgraham8-Mar-07 12:46 
Questionserialization of derived classes Pin
AndyKEnZ7-Mar-07 7:01
MemberAndyKEnZ7-Mar-07 7:01 
Questionhow to insert background image on report? Pin
priya_p2336-Mar-07 17:38
Memberpriya_p2336-Mar-07 17:38 
AnswerRe: how to insert background image on report? Pin
nare7006-Mar-07 17:59
Membernare7006-Mar-07 17:59 
Question.NET 2.0 on WInNT Pin
bitfch6-Mar-07 10:54
Memberbitfch6-Mar-07 10:54 
AnswerRe: .NET 2.0 on WInNT Pin
Dave Kreskowiak6-Mar-07 11:28
mveDave Kreskowiak6-Mar-07 11:28 
GeneralRe: .NET 2.0 on WInNT Pin
bitfch6-Mar-07 11:32
Memberbitfch6-Mar-07 11:32 
GeneralRe: .NET 2.0 on WInNT Pin
Dave Kreskowiak6-Mar-07 13:12
mveDave Kreskowiak6-Mar-07 13:12 
AnswerRe: .NET 2.0 on WInNT Pin
Dan Neely7-Mar-07 3:58
MemberDan Neely7-Mar-07 3:58 
GeneralRe: .NET 2.0 on WInNT Pin
Dave Kreskowiak7-Mar-07 6:53
mveDave Kreskowiak7-Mar-07 6:53 
GeneralRe: .NET 2.0 on WInNT Pin
Dan Neely7-Mar-07 8:51
MemberDan Neely7-Mar-07 8:51 
QuestionRemoting and Datasets Pin
Kir Birger6-Mar-07 10:11
MemberKir Birger6-Mar-07 10:11 
AnswerRe: Remoting and Datasets Pin
kubben6-Mar-07 11:08
Memberkubben6-Mar-07 11:08 
GeneralRe: Remoting and Datasets Pin
Kir Birger6-Mar-07 11:43
MemberKir Birger6-Mar-07 11:43 
Questionwww.bozemanblog.com Pin
aleks_malcev6-Mar-07 3:05
Memberaleks_malcev6-Mar-07 3:05 
QuestionMultiple projects in 1 solution Pin
aasstt6-Mar-07 0:05
Memberaasstt6-Mar-07 0:05 

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.