Click here to Skip to main content
15,908,264 members
Home / Discussions / C#
   

C#

 
QuestionSet System Default Sound device Pin
Rahul.RK29-Aug-06 2:30
Rahul.RK29-Aug-06 2:30 
AnswerRe: Set System Default Sound device Pin
Nader Elshehabi29-Aug-06 5:42
Nader Elshehabi29-Aug-06 5:42 
QuestionMove e-mail to folder. Pin
mbnbonin29-Aug-06 2:21
mbnbonin29-Aug-06 2:21 
QuestionMesh edges not smooth Pin
mirano29-Aug-06 1:48
mirano29-Aug-06 1:48 
Questionavoiding delegates Pin
lushgrass29-Aug-06 1:40
lushgrass29-Aug-06 1:40 
AnswerRe: avoiding delegates Pin
Nader Elshehabi29-Aug-06 1:50
Nader Elshehabi29-Aug-06 1:50 
GeneralRe: avoiding delegates Pin
BadKarma29-Aug-06 2:32
BadKarma29-Aug-06 2:32 
AnswerRe: avoiding delegates Pin
Nader Elshehabi29-Aug-06 3:46
Nader Elshehabi29-Aug-06 3:46 
hello

BadKarma wrote:
every callback instantiates a thread

Pardon me but, I totaly disagree. Delegates don't make threads by themselves unless you call them asynchronously. Here is a small demo:

private delegate void MyDel();
MyDel NewDel;

Form1() //The constructor
{
    NewDel = new MyDel(MyDelMethod);
}

void MyLink_Click(object sender, EventArgs e)
{
    for (int i = 0; i < 5; i++)
        Invoke(NewDel);
}

private void MyDelMethod()
{
    MessageBox.Show("Hello");
}


You will see that the Invoke call is blocked by the Messagebox.Show and the second message isn't shown until you close the previous one. Also because the Invoke was called from the main thread, you will see that the UI is blocked as well.

RegardsRose | [Rose]

GeneralRe: avoiding delegates Pin
BadKarma29-Aug-06 4:12
BadKarma29-Aug-06 4:12 
GeneralRe: avoiding delegates Pin
lushgrass29-Aug-06 16:49
lushgrass29-Aug-06 16:49 
AnswerRe: avoiding delegates Pin
Nader Elshehabi30-Aug-06 8:49
Nader Elshehabi30-Aug-06 8:49 
Questionsingletone class Pin
srinandan..29-Aug-06 1:36
srinandan..29-Aug-06 1:36 
AnswerRe: singletone class Pin
Stefan Troschuetz29-Aug-06 2:30
Stefan Troschuetz29-Aug-06 2:30 
AnswerRe: Singleton class Pin
Michael P Butler29-Aug-06 3:57
Michael P Butler29-Aug-06 3:57 
AnswerRe: singletone class Pin
led mike29-Aug-06 4:49
led mike29-Aug-06 4:49 
QuestionDirectShow and C#.Net Web application Pin
MilindThakkar29-Aug-06 1:22
MilindThakkar29-Aug-06 1:22 
Questionplay flash file in Picturebox? Pin
MudkiSekhon29-Aug-06 0:30
MudkiSekhon29-Aug-06 0:30 
AnswerRe: play flash file in Picturebox? Pin
Mohamed El Gohary29-Aug-06 1:16
Mohamed El Gohary29-Aug-06 1:16 
AnswerRe: play flash file in Picturebox? Pin
AB777129-Aug-06 1:18
AB777129-Aug-06 1:18 
GeneralRe: play flash file in Picturebox? Pin
MudkiSekhon29-Aug-06 1:47
MudkiSekhon29-Aug-06 1:47 
GeneralRe: play flash file in Picturebox? Pin
Dan Neely29-Aug-06 2:20
Dan Neely29-Aug-06 2:20 
GeneralRe: play flash file in Picturebox? Pin
AB777129-Aug-06 2:22
AB777129-Aug-06 2:22 
QuestionGet text value from image file Pin
M Riaz Bashir29-Aug-06 0:17
M Riaz Bashir29-Aug-06 0:17 
AnswerRe: Get text value from image file Pin
J4amieC29-Aug-06 0:34
J4amieC29-Aug-06 0:34 
Questionbitmap problem ??? help please ... Pin
cmpeng3429-Aug-06 0:00
cmpeng3429-Aug-06 0:00 

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.