Click here to Skip to main content
15,891,136 members
Home / Discussions / C#
   

C#

 
GeneralRe: about the interface of C# Pin
Richard Blythe3-Jun-09 4:51
Richard Blythe3-Jun-09 4:51 
AnswerRe: about the interface of C# Pin
Pete O'Hanlon2-Jun-09 21:41
mvePete O'Hanlon2-Jun-09 21:41 
AnswerRe: about the interface of C# Pin
Alan Balkany3-Jun-09 5:07
Alan Balkany3-Jun-09 5:07 
GeneralRe: about the interface of C# Pin
mctramp1683-Jun-09 14:37
mctramp1683-Jun-09 14:37 
Questioncross thread operations Pin
spiritboy2-Jun-09 8:58
spiritboy2-Jun-09 8:58 
QuestionRe: cross thread operations Pin
harold aptroot2-Jun-09 9:57
harold aptroot2-Jun-09 9:57 
AnswerRe: cross thread operations Pin
DaveyM692-Jun-09 9:57
professionalDaveyM692-Jun-09 9:57 
GeneralRe: cross thread operations Pin
spiritboy2-Jun-09 12:26
spiritboy2-Jun-09 12:26 
I know the Invoke procedure, but we can use Invoke when we have a Form!(Form.Invoke())
my threads are implemented in Program class where i Run my application(and there is no this.Invoke method!):

look here: my Form1 obj(f) during its lifetime will raise some events! i want to handle those events from thread2 and do the jobs in thread2!
using System;
using System.Collections.Generic;
using System.Linq;
using System.Windows.Forms;
namespace Server
{
    static class Program
    {
        static System.Threading.Thread thread2 = null;
        [STAThread]
        static void Main()
        {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            Application.SetUnhandledExceptionMode(UnhandledExceptionMode.CatchException);
            Form1 f = new Form1();
            thread2 = new System.Threading.Thread(new System.Threading.ThreadStart(worker));
            thread2.IsBackground = true;
            thread2.ApartmentState = System.Threading.ApartmentState.STA;
            thread2.Start();
            try
            {
                f.job1 += new EventHandler(Job1);
                f.job2 += new EventHandler(Job2;
                f.job3 += new EventHandler(Job3);
                Application.Run(f);
            }
            catch(Exception r)
            { 
            }
        }
        static void worker()
        {
            //create a splash screen and update its progress due to events job1,job2 and job3
        }
}

GeneralRe: cross thread operations Pin
Henry Minute2-Jun-09 12:42
Henry Minute2-Jun-09 12:42 
GeneralRe: cross thread operations Pin
S. Senthil Kumar2-Jun-09 19:09
S. Senthil Kumar2-Jun-09 19:09 
GeneralRe: cross thread operations Pin
spiritboy2-Jun-09 12:43
spiritboy2-Jun-09 12:43 
GeneralRe: cross thread operations Pin
harold aptroot2-Jun-09 12:46
harold aptroot2-Jun-09 12:46 
QuestionStored Procedure that returns data with Entity Data Model not working Pin
dfn2-Jun-09 6:10
dfn2-Jun-09 6:10 
AnswerRe: Stored Procedure that returns data with Entity Data Model not working Pin
Henry Minute2-Jun-09 6:55
Henry Minute2-Jun-09 6:55 
GeneralRe: Stored Procedure that returns data with Entity Data Model not working Pin
Luc Pattyn2-Jun-09 7:12
sitebuilderLuc Pattyn2-Jun-09 7:12 
GeneralRe: Stored Procedure that returns data with Entity Data Model not working Pin
EliottA2-Jun-09 10:32
EliottA2-Jun-09 10:32 
AnswerRe: Stored Procedure that returns data with Entity Data Model not working Pin
Luc Pattyn2-Jun-09 6:55
sitebuilderLuc Pattyn2-Jun-09 6:55 
AnswerRe: Stored Procedure that returns data with Entity Data Model not working Pin
dfn3-Jun-09 6:04
dfn3-Jun-09 6:04 
QuestionFlowLayoutPanel docking, unusual behavior. Pin
EliottA2-Jun-09 5:43
EliottA2-Jun-09 5:43 
AnswerRe: FlowLayoutPanel docking, unusual behavior. Pin
Henry Minute2-Jun-09 5:59
Henry Minute2-Jun-09 5:59 
GeneralRe: FlowLayoutPanel docking, unusual behavior. Pin
EliottA2-Jun-09 7:06
EliottA2-Jun-09 7:06 
QuestionC# Media Player Pin
sagiklan2-Jun-09 5:30
sagiklan2-Jun-09 5:30 
AnswerRe: C# Media Player Pin
0x3c02-Jun-09 5:32
0x3c02-Jun-09 5:32 
AnswerRe: C# Media Player Pin
EliottA2-Jun-09 5:45
EliottA2-Jun-09 5:45 
GeneralRe: C# Media Player Pin
Manas Bhardwaj2-Jun-09 5:56
professionalManas Bhardwaj2-Jun-09 5:56 

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.