Click here to Skip to main content
15,919,434 members
Home / Discussions / C#
   

C#

 
GeneralRe: How do you save images loaded in a Microsoft Web Browser Control? Pin
Heath Stewart27-Aug-04 8:56
protectorHeath Stewart27-Aug-04 8:56 
GeneralRe: How do you save images loaded in a Microsoft Web Browser Control? Pin
kayhustle27-Aug-04 10:21
kayhustle27-Aug-04 10:21 
GeneralRe: How do you save images loaded in a Microsoft Web Browser Control? Pin
Heath Stewart27-Aug-04 10:25
protectorHeath Stewart27-Aug-04 10:25 
GeneralRe: How do you save images loaded in a Microsoft Web Browser Control? Pin
kayhustle27-Aug-04 11:44
kayhustle27-Aug-04 11:44 
GeneralRe: How do you save images loaded in a Microsoft Web Browser Control? Pin
Heath Stewart27-Aug-04 11:57
protectorHeath Stewart27-Aug-04 11:57 
QuestionQ. How do you start 2 or more other classes to threading from a single Form1?? Pin
gman4426-Aug-04 12:57
gman4426-Aug-04 12:57 
AnswerRe: Q. How do you start 2 or more other classes to threading from a single Form1?? Pin
kayhustle26-Aug-04 13:25
kayhustle26-Aug-04 13:25 
AnswerRe: Q. How do you start 2 or more other classes to threading from a single Form1?? Pin
LongRange.Shooter27-Aug-04 10:15
LongRange.Shooter27-Aug-04 10:15 
You have to be careful of what you are doing though.

If those threads have the end purpose of sending new information to a Windows Form you will have very unpredictable results.

You either have to ensure that your threads are within the message pump apartment or you have to alter memory in your program and then setup another thread to monitor changes. The Windows.Forms.Timer will do that. This is a rough example of a skeleton of a program that would accomplish something like that.

Example:

 public class Chess()
 {
   ...
   public void MoveKing(chessBoard);
   {
       do {
       Stack[] moveStacks = new Stack[10];
       // construct move stacks analyze weigh move
         ....
         // reached decision to end myself
         if (moveMade)
         {
         move = "K-KR3";
         this.Threading.Thread.Stop();
         }
         ...
       } while (threadExecutionRequired);
       // now determine which was best move
       // when my thinking was interuptted
       move = "RESIGN";
    }
    public Chess()
    {
       IntializeComponents();
       threadExecutionRequired=false;
    }
    public void PlayChess()
    {
       ....
    }
    private void MakeMyMove()
    {
      Thread moveThread = new Thread(MoveKing);
       moveThread.Start();
       this.formTimer.Start();
    }
    private formTimer_Tick(...)
    {
       if (ICantWaitAnyLonger)
        {
           threadExecutionRequired=false;
         }
        if (move != null) // a move was announced
        {
           //update form within apartment thread
          MakeMyMove(move);
          DisplayBoard(chessBoard);
          formTimer.Stop();
         }
    }
}


This signature left intentionally blank
GeneralLooking for someone who is familiar with iTextSharp library (PDF files creating) Pin
Member 103390726-Aug-04 12:13
Member 103390726-Aug-04 12:13 
GeneralRe: Looking for someone who is familiar with iTextSharp library (PDF files creating) Pin
Heath Stewart26-Aug-04 13:38
protectorHeath Stewart26-Aug-04 13:38 
GeneralRe: Looking for someone who is familiar with iTextSharp library (PDF files creating) Pin
Member 103390727-Aug-04 10:51
Member 103390727-Aug-04 10:51 
Generalreading NTFS Master File Table Pin
redjoy26-Aug-04 11:58
redjoy26-Aug-04 11:58 
GeneralRe: reading NTFS Master File Table Pin
Anonymous26-Aug-04 12:49
Anonymous26-Aug-04 12:49 
Generaladding an item to a listview Pin
yitzstokes26-Aug-04 10:05
yitzstokes26-Aug-04 10:05 
GeneralRe: adding an item to a listview Pin
Nick Parker26-Aug-04 11:46
protectorNick Parker26-Aug-04 11:46 
GeneralWhen is Archer's Inside C# 3rd edition slated for publishing Pin
Joe Woodbury26-Aug-04 10:04
professionalJoe Woodbury26-Aug-04 10:04 
GeneralRe: When is Archer's Inside C# 3rd edition slated for publishing Pin
Jon Sagara26-Aug-04 14:57
Jon Sagara26-Aug-04 14:57 
General.Net applications in Linux Pin
vadim_3k26-Aug-04 9:21
sussvadim_3k26-Aug-04 9:21 
GeneralRe: .Net applications in Linux Pin
leppie26-Aug-04 9:30
leppie26-Aug-04 9:30 
GeneralRe: .Net applications in Linux Pin
Judah Gabriel Himango26-Aug-04 9:34
sponsorJudah Gabriel Himango26-Aug-04 9:34 
GeneralRe: .Net applications in Linux Pin
Heath Stewart26-Aug-04 10:36
protectorHeath Stewart26-Aug-04 10:36 
GeneralRe: .Net applications in Linux Pin
Nick Parker26-Aug-04 11:43
protectorNick Parker26-Aug-04 11:43 
GeneralRe: .Net applications in Linux Pin
Heath Stewart26-Aug-04 13:24
protectorHeath Stewart26-Aug-04 13:24 
GeneralRe: .Net applications in Linux Pin
leppie26-Aug-04 23:56
leppie26-Aug-04 23:56 
GeneralRe: .Net applications in Linux Pin
Heath Stewart27-Aug-04 9:05
protectorHeath Stewart27-Aug-04 9: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.