Click here to Skip to main content
15,896,606 members
Home / Discussions / C#
   

C#

 
QuestionNavigating between forms Pin
Berlus26-Jun-11 1:19
Berlus26-Jun-11 1:19 
AnswerRe: Navigating between forms Pin
Mycroft Holmes26-Jun-11 1:59
professionalMycroft Holmes26-Jun-11 1:59 
AnswerRe: Navigating between forms Pin
Not Active27-Jun-11 2:29
mentorNot Active27-Jun-11 2:29 
QuestionCustom control sometimes doesn't paint/refresh the button on it Pin
teknolog12325-Jun-11 23:13
teknolog12325-Jun-11 23:13 
AnswerRe: Custom control sometimes doesn't paint/refresh the button on it Pin
Dave Kreskowiak27-Jun-11 9:22
mveDave Kreskowiak27-Jun-11 9:22 
QuestionStarting intrupped thread again.. Pin
shivamkalra25-Jun-11 19:06
shivamkalra25-Jun-11 19:06 
AnswerRe: Starting intrupped thread again.. Pin
MicroVirus26-Jun-11 0:44
MicroVirus26-Jun-11 0:44 
QuestionNamedPipeClientStream.Connect(int) doesn't throw Exception if Form is closed. [fixed, workaround] Pin
Xmen Real 25-Jun-11 17:59
professional Xmen Real 25-Jun-11 17:59 
So I have a code to connect to NamedPipeServerStream, code works fine but after closing the Form, Connect never throws exception and Application do not ends.

void BeginConnect()
{
    new Thread(new ThreadStart(delegate()
    {
        NamedPipeClientStream client = new NamedPipeClientStream(".", "testpipe", PipeDirection.InOut);
        try
        {
            client.Connect(5000); // connect client as another server instance available
            //raise connect event
        }
        catch (TimeoutException ex) //Could not connect to the server within the specified timeout period.
        {
        }
        catch (IOException ex) //The server is connected to another client and the time-out period has expired.
        {
        }

        BeginConnect();
    })).Start();
}




One more thing, why this simple code taking more than 50% CPU Frown | :(


edit :
Found a workaround, http://social.msdn.microsoft.com/Forums/en-US/netfxnetcom/thread/7bbf5a0b-3c22-4836-b271-999e514c321b/[^]

TVMU^P[[IGIOQHG^JSH`A#@`RFJ\c^JPL>;"[,*/|+&WLEZGc`AFXc!L
%^]*IRXD#@GKCQ`R\^SF_WcHbORY87֦ʻ6ϣN8ȤBcRAV\Z^&SU~%CSWQ@#2
W_AD`EPABIKRDFVS)EVLQK)JKQUFK[M`UKs*$GwU#QDXBER@CBN%
R0~53%eYrd8mt^7Z6]iTF+(EWfJ9zaK-i’TV.C\y<pŠjxsg-b$f4ia>

-----------------------------------------------
128 bit encrypted signature, crack if you can

modified on Sunday, June 26, 2011 12:17 AM

QuestionKnow when form loses focus? Pin
Matt U.25-Jun-11 13:30
Matt U.25-Jun-11 13:30 
AnswerRe: Know when form loses focus? Pin
Dr.Walt Fair, PE25-Jun-11 16:49
professionalDr.Walt Fair, PE25-Jun-11 16:49 
GeneralRe: Know when form loses focus? Pin
Matt U.26-Jun-11 2:47
Matt U.26-Jun-11 2:47 
QuestionPopulate Listview using LINQ Pin
klaydze24-Jun-11 15:22
klaydze24-Jun-11 15:22 
QuestionRe: Populate Listview using LINQ Pin
Mario Majčica24-Jun-11 21:20
professionalMario Majčica24-Jun-11 21:20 
AnswerRe: Populate Listview using LINQ Pin
#realJSOP25-Jun-11 0:30
professional#realJSOP25-Jun-11 0:30 
GeneralRe: Populate Listview using LINQ Pin
Mycroft Holmes25-Jun-11 2:39
professionalMycroft Holmes25-Jun-11 2:39 
GeneralRe: Populate Listview using LINQ Pin
Dan Mos25-Jun-11 3:26
Dan Mos25-Jun-11 3:26 
GeneralRe: Populate Listview using LINQ Pin
Not Active27-Jun-11 2:27
mentorNot Active27-Jun-11 2:27 
AnswerRe: Populate Listview using LINQ Pin
klaydze25-Jun-11 3:25
klaydze25-Jun-11 3:25 
QuestionTask queues to execute a task one by one in file downloader program. [modified] Pin
shivamkalra24-Jun-11 12:37
shivamkalra24-Jun-11 12:37 
AnswerRe: Task queues to execute a task one by one in file downloader program. Pin
Richard MacCutchan24-Jun-11 23:01
mveRichard MacCutchan24-Jun-11 23:01 
QuestionNot Lost focus of form. Pin
Anubhava Dimri23-Jun-11 23:46
Anubhava Dimri23-Jun-11 23:46 
AnswerRe: Not Lost focus of form. Pin
Mario Majčica24-Jun-11 4:12
professionalMario Majčica24-Jun-11 4:12 
SuggestionRe: Not Lost focus of form. Pin
MicroVirus24-Jun-11 6:08
MicroVirus24-Jun-11 6:08 
GeneralRe: Not Lost focus of form. Pin
Mario Majčica24-Jun-11 9:50
professionalMario Majčica24-Jun-11 9:50 
GeneralRe: Not Lost focus of form. Pin
MicroVirus24-Jun-11 11:14
MicroVirus24-Jun-11 11:14 

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.