Click here to Skip to main content
15,927,055 members
Home / Discussions / C#
   

C#

 
GeneralRe: UserControl in VisualBasic 6.0 Pin
Mazdak29-Feb-04 21:00
Mazdak29-Feb-04 21:00 
GeneralInserting thread in single process Pin
azusakt29-Feb-04 20:26
azusakt29-Feb-04 20:26 
GeneralRe: Inserting thread in single process Pin
Stefan Troschuetz29-Feb-04 21:27
Stefan Troschuetz29-Feb-04 21:27 
GeneralRe: Inserting thread in single process Pin
azusakt29-Feb-04 22:55
azusakt29-Feb-04 22:55 
GeneralRe: Inserting thread in single process Pin
Stefan Troschuetz29-Feb-04 23:20
Stefan Troschuetz29-Feb-04 23:20 
GeneralRe: Inserting thread in single process Pin
azusakt2-Mar-04 14:33
azusakt2-Mar-04 14:33 
GeneralRe: Inserting thread in single process Pin
Stefan Troschuetz3-Mar-04 4:22
Stefan Troschuetz3-Mar-04 4:22 
GeneralRe: Inserting thread in single process Pin
scadaguy1-Mar-04 2:52
scadaguy1-Mar-04 2:52 
Try something like the following. I didn't test this so it may require some minor modifications.

private delegate void MyCallbackDelegate();

private void menuItem4_Click(object sender, System.EventArgs e)
{
  // Start the thread.
  outThread = new Thread(new ThreadStart(this.ThreadProc));
  outThread.IsBackground = true;
  outThread.Start();


  // Do not block the UI thread by placing a while loop
  // or Join() here.
}

private void ThreadProc()
{ 
  Main_generate_process();
  
  // Now we need to inform the UI thread that we are done.
  // We do this by executing a method on the UI thread.
  this.Invoke(new MyCallbackDelegate(this.InformUI)); 
}

private void InformUI()
{
  // We can safely access form controls because we are 
  // executing on the UI thread.
}

GeneralRe: Inserting thread in single process Pin
Tom Larsen1-Mar-04 4:23
Tom Larsen1-Mar-04 4:23 
GeneralRe: Inserting thread in single process Pin
scadaguy1-Mar-04 4:58
scadaguy1-Mar-04 4:58 
GeneralRe: Inserting thread in single process Pin
Tom Larsen1-Mar-04 5:32
Tom Larsen1-Mar-04 5:32 
GeneralXML Serialization question Pin
Sean Cull29-Feb-04 16:27
Sean Cull29-Feb-04 16:27 
GeneralRe: XML Serialization question Pin
Heath Stewart29-Feb-04 17:55
protectorHeath Stewart29-Feb-04 17:55 
GeneralBasics Pin
Matthew Hazlett29-Feb-04 13:14
Matthew Hazlett29-Feb-04 13:14 
GeneralRe: Basics Pin
Jonathan de Halleux29-Feb-04 13:32
Jonathan de Halleux29-Feb-04 13:32 
GeneralRe: Basics Pin
Colin Angus Mackay29-Feb-04 13:35
Colin Angus Mackay29-Feb-04 13:35 
GeneralRe: Basics Pin
Matthew Hazlett29-Feb-04 14:31
Matthew Hazlett29-Feb-04 14:31 
GeneralRe: Basics Pin
Colin Angus Mackay29-Feb-04 14:38
Colin Angus Mackay29-Feb-04 14:38 
GeneralRe: Basics Pin
Matthew Hazlett29-Feb-04 14:47
Matthew Hazlett29-Feb-04 14:47 
GeneralRe: Basics Pin
Colin Angus Mackay29-Feb-04 15:04
Colin Angus Mackay29-Feb-04 15:04 
GeneralRe: Basics Pin
Matthew Hazlett29-Feb-04 19:16
Matthew Hazlett29-Feb-04 19:16 
GeneralDo not understand this (ListView) Pin
Snowjim29-Feb-04 13:01
Snowjim29-Feb-04 13:01 
QuestionSTRRET - Solved? Pin
Tristan Rhodes29-Feb-04 9:12
Tristan Rhodes29-Feb-04 9:12 
AnswerRe: STRRET - Solved? Pin
leppie29-Feb-04 10:41
leppie29-Feb-04 10:41 
AnswerRe: STRRET - Solved? Pin
Dave Kreskowiak29-Feb-04 11:15
mveDave Kreskowiak29-Feb-04 11:15 

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.