Click here to Skip to main content
15,898,222 members
Home / Discussions / .NET (Core and Framework)
   

.NET (Core and Framework)

 
GeneralRe: Breakpoint will not currently be hit Pin
TeachesOfPeaches9-Mar-07 11:54
TeachesOfPeaches9-Mar-07 11:54 
QuestionWebConfig Section for .NET Framework 3.0 Pin
Vasudevan Deepak Kumar7-Mar-07 10:47
Vasudevan Deepak Kumar7-Mar-07 10:47 
QuestionSockets issue, how to listen to UDP socket for multiple instances Pin
nsutanto7-Mar-07 10:36
nsutanto7-Mar-07 10:36 
QuestionMultithreading Local Variables Pin
MikeMarq7-Mar-07 8:09
MikeMarq7-Mar-07 8:09 
AnswerRe: Multithreading Local Variables Pin
Leslie Sanford7-Mar-07 8:21
Leslie Sanford7-Mar-07 8:21 
GeneralRe: Multithreading Local Variables Pin
MikeMarq7-Mar-07 10:49
MikeMarq7-Mar-07 10:49 
AnswerRe: Multithreading Local Variables Pin
arcticbrew7-Mar-07 19:19
arcticbrew7-Mar-07 19:19 
QuestionDo Events causing overflow Pin
earlgraham7-Mar-07 8:04
earlgraham7-Mar-07 8: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 12:46
professionalScott Page7-Mar-07 12:46 
GeneralRe: Do Events causing overflow Pin
earlgraham8-Mar-07 11:46
earlgraham8-Mar-07 11:46 
Questionserialization of derived classes Pin
AndyKEnZ7-Mar-07 6:01
AndyKEnZ7-Mar-07 6:01 
Questionhow to insert background image on report? Pin
priya_p2336-Mar-07 16:38
priya_p2336-Mar-07 16:38 
AnswerRe: how to insert background image on report? Pin
nare7006-Mar-07 16:59
nare7006-Mar-07 16:59 
Question.NET 2.0 on WInNT Pin
bitfch6-Mar-07 9:54
bitfch6-Mar-07 9:54 
AnswerRe: .NET 2.0 on WInNT Pin
Dave Kreskowiak6-Mar-07 10:28
mveDave Kreskowiak6-Mar-07 10:28 
GeneralRe: .NET 2.0 on WInNT Pin
bitfch6-Mar-07 10:32
bitfch6-Mar-07 10:32 
GeneralRe: .NET 2.0 on WInNT Pin
Dave Kreskowiak6-Mar-07 12:12
mveDave Kreskowiak6-Mar-07 12:12 
AnswerRe: .NET 2.0 on WInNT Pin
Dan Neely7-Mar-07 2:58
Dan Neely7-Mar-07 2:58 
GeneralRe: .NET 2.0 on WInNT Pin
Dave Kreskowiak7-Mar-07 5:53
mveDave Kreskowiak7-Mar-07 5:53 
GeneralRe: .NET 2.0 on WInNT Pin
Dan Neely7-Mar-07 7:51
Dan Neely7-Mar-07 7:51 
QuestionRemoting and Datasets Pin
Kir Birger6-Mar-07 9:11
Kir Birger6-Mar-07 9:11 
AnswerRe: Remoting and Datasets Pin
kubben6-Mar-07 10:08
kubben6-Mar-07 10:08 
GeneralRe: Remoting and Datasets Pin
Kir Birger6-Mar-07 10:43
Kir Birger6-Mar-07 10:43 
Questionwww.bozemanblog.com Pin
aleks_malcev6-Mar-07 2:05
aleks_malcev6-Mar-07 2:05 
QuestionMultiple projects in 1 solution Pin
aasstt5-Mar-07 23:05
aasstt5-Mar-07 23: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.