Click here to Skip to main content
15,889,877 members
Home / Discussions / C#
   

C#

 
QuestionHooking MessageBox YES/NO button Text Pin
lalmama19-Mar-09 23:19
lalmama19-Mar-09 23:19 
AnswerRe: Hooking MessageBox YES/NO button Text Pin
Eddy Vluggen20-Mar-09 2:14
professionalEddy Vluggen20-Mar-09 2:14 
QuestionRead 2D || QR Barcode from Compact Framework Pin
Tyler4519-Mar-09 22:43
Tyler4519-Mar-09 22:43 
AnswerRe: Read 2D || QR Barcode from Compact Framework Pin
musefan19-Mar-09 22:49
musefan19-Mar-09 22:49 
AnswerRe: Read 2D || QR Barcode from Compact Framework Pin
Deresen19-Mar-09 23:50
Deresen19-Mar-09 23:50 
QuestionPassing data from a child thread Pin
vikingsimon19-Mar-09 22:20
vikingsimon19-Mar-09 22:20 
AnswerRe: Passing data from a child thread Pin
Cracked-Down19-Mar-09 22:43
Cracked-Down19-Mar-09 22:43 
AnswerRe: Passing data from a child thread [modified] Pin
12Code19-Mar-09 23:07
12Code19-Mar-09 23:07 
In your serial port receive event, Test class,
add an event:
private void Test_DataReceived(object sender, EventArgs e)
{
        // do RxText here...

        OnEventRxCompleted(RxText);
}

public delegate void TestEventHandler(string Text);
public event TestEventHandler EventRxCompleted;
protected void OnEventRxCompleted(string RxText)
{
    if (EventRxCompleted != null)
    {
        EventRxCompleted(RxText); // Fire event now
    }
}


in Parent from:
add this in constructor,
Test.EventRxCompleted+= new Test.TestEventHandler(EventDataReceived);

and also,
void EventDataReceived(string Text)
{
    SetText(Text);
}

delegate void SetTextCallback(string text);
private void SetText(string text)
{
    if (txtParent.InvokeRequired) // txtParent is TextBox in parent form
    {
        SetTextCallback d = new SetTextCallback(SetText);
        this.Invoke(d, new object[] { text });
    }
    else
    {
        txtParent.Text = text;
    }
}


Kelvin

modified on Friday, March 20, 2009 5:14 AM

QuestionIs it possible to call the GarbageCollector of an other process! Pin
Martin#19-Mar-09 21:55
Martin#19-Mar-09 21:55 
AnswerRe: Is it possible to call the GarbageCollector of an other process! Pin
Christian Graus19-Mar-09 22:00
protectorChristian Graus19-Mar-09 22:00 
GeneralRe: Is it possible to call the GarbageCollector of an other process! Pin
Martin#19-Mar-09 22:07
Martin#19-Mar-09 22:07 
AnswerRe: Is it possible to call the GarbageCollector of an other process! Pin
S. Senthil Kumar20-Mar-09 3:36
S. Senthil Kumar20-Mar-09 3:36 
GeneralRe: Is it possible to call the GarbageCollector of an other process! [modified] Pin
Martin#20-Mar-09 5:06
Martin#20-Mar-09 5:06 
AnswerRe: Is it possible to call the GarbageCollector of an other process! Pin
Luc Pattyn20-Mar-09 4:28
sitebuilderLuc Pattyn20-Mar-09 4:28 
GeneralRe: Is it possible to call the GarbageCollector of an other process! Pin
Martin#20-Mar-09 4:56
Martin#20-Mar-09 4:56 
QuestionModelpopup with dropdownlistbox Pin
gopinathtamil19-Mar-09 21:50
gopinathtamil19-Mar-09 21:50 
AnswerRe: Modelpopup with dropdownlistbox Pin
Christian Graus19-Mar-09 21:54
protectorChristian Graus19-Mar-09 21:54 
QuestionProgramatically providing Database file path to DSN using C# Pin
bijaykumar0119-Mar-09 21:28
bijaykumar0119-Mar-09 21:28 
Questionfile string upload in textbox Pin
Mangesh Tomar19-Mar-09 20:36
Mangesh Tomar19-Mar-09 20:36 
AnswerRe: file string upload in textbox Pin
Christian Graus19-Mar-09 21:00
protectorChristian Graus19-Mar-09 21:00 
AnswerRe: file string upload in textbox Pin
jaypatel51219-Mar-09 23:07
jaypatel51219-Mar-09 23:07 
GeneralRe: file string upload in textbox Pin
Mangesh Tomar20-Mar-09 18:49
Mangesh Tomar20-Mar-09 18:49 
GeneralRe: file string upload in textbox Pin
jaypatel51220-Mar-09 18:53
jaypatel51220-Mar-09 18:53 
Questionkrishan Pin
krish@n19-Mar-09 20:30
krish@n19-Mar-09 20:30 
AnswerRe: krishan Pin
Christian Graus19-Mar-09 21:06
protectorChristian Graus19-Mar-09 21:06 

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.