Click here to Skip to main content
15,890,947 members
Home / Discussions / Windows Forms
   

Windows Forms

 
Questionis it possible to show ms excel inside a windowform? Pin
neodeaths22-Sep-10 5:32
neodeaths22-Sep-10 5:32 
AnswerRe: is it possible to show ms excel inside a windowform? Pin
Abhinav S22-Sep-10 6:41
Abhinav S22-Sep-10 6:41 
QuestionApp "NOT RESPONDING" on opening some other window Pin
All Time Programming22-Sep-10 3:37
All Time Programming22-Sep-10 3:37 
AnswerRe: App "NOT RESPONDING" on opening some other window Pin
Dave Kreskowiak22-Sep-10 6:38
mveDave Kreskowiak22-Sep-10 6:38 
GeneralRe: App "NOT RESPONDING" on opening some other window Pin
All Time Programming22-Sep-10 22:38
All Time Programming22-Sep-10 22:38 
GeneralRe: App "NOT RESPONDING" on opening some other window Pin
Dave Kreskowiak23-Sep-10 1:57
mveDave Kreskowiak23-Sep-10 1:57 
GeneralRe: App "NOT RESPONDING" on opening some other window Pin
All Time Programming23-Sep-10 6:13
All Time Programming23-Sep-10 6:13 
GeneralRe: App "NOT RESPONDING" on opening some other window Pin
Luc Pattyn23-Sep-10 6:42
sitebuilderLuc Pattyn23-Sep-10 6:42 
Your code looks basically OK, assuming SetTextData() is not directly manipulating a GUI Control.
Similar to (from the article):
public void SetText(Control control, string text) {
    if (control.InvokeRequired) {
        control.Invoke(new ControlStringConsumer(SetText), new object[]{control, text});  // invoking itself
    } else {
        control.Text=text;      // the "functional part", executing only on the main thread
    }
}


you should do:
public void AppendText(TextBox control, string text) {
    if (control.InvokeRequired) {
        control.Invoke(new ControlStringConsumer(AppendText), new object[]{control, text});  // invoking itself
    } else {
        control.AppendText(text);      // the "functional part", executing only on the main thread
    }
}


Smile | :)
Luc Pattyn [Forum Guidelines] [Why QA sucks] [My Articles] Nil Volentibus Arduum
Please use <PRE> tags for code snippets, they preserve indentation, and improve readability.


QuestionRe: App "NOT RESPONDING" on opening some other window Pin
All Time Programming27-Sep-10 6:19
All Time Programming27-Sep-10 6:19 
AnswerRe: App "NOT RESPONDING" on opening some other window Pin
Luc Pattyn27-Sep-10 6:30
sitebuilderLuc Pattyn27-Sep-10 6:30 
QuestionConnect controls to thread Pin
Moshe T20-Sep-10 12:50
Moshe T20-Sep-10 12:50 
AnswerRe: Connect controls to thread Pin
Luc Pattyn20-Sep-10 13:01
sitebuilderLuc Pattyn20-Sep-10 13:01 
GeneralRe: Connect controls to thread Pin
Moshe T20-Sep-10 13:11
Moshe T20-Sep-10 13:11 
GeneralRe: Connect controls to thread Pin
Luc Pattyn20-Sep-10 13:20
sitebuilderLuc Pattyn20-Sep-10 13:20 
GeneralRe: Connect controls to thread Pin
Moshe T20-Sep-10 13:30
Moshe T20-Sep-10 13:30 
AnswerRe: Connect controls to thread Pin
dybs9-Dec-10 11:47
dybs9-Dec-10 11:47 
QuestionDesignTimeSupport for TableLayoutPanel with dynamic added controls in each cell Pin
akamper15-Sep-10 23:10
akamper15-Sep-10 23:10 
AnswerRe: DesignTimeSupport for TableLayoutPanel with dynamic added controls in each cell Pin
Henry Minute16-Sep-10 5:27
Henry Minute16-Sep-10 5:27 
GeneralRe: DesignTimeSupport for TableLayoutPanel with dynamic added controls in each cell Pin
akamper16-Sep-10 22:42
akamper16-Sep-10 22:42 
QuestionProblems with embed windows media player in VB.net form Pin
ocabrera7013-Sep-10 15:05
ocabrera7013-Sep-10 15:05 
QuestionPass incoming data from Child to parent Form Pin
KenKen Wong10-Sep-10 21:38
KenKen Wong10-Sep-10 21:38 
AnswerRe: Pass incoming data from Child to parent Form Pin
Pete O'Hanlon11-Sep-10 2:11
mvePete O'Hanlon11-Sep-10 2:11 
GeneralRe: Pass incoming data from Child to parent Form Pin
KenKen Wong12-Sep-10 15:27
KenKen Wong12-Sep-10 15:27 
GeneralRe: Pass incoming data from Child to parent Form Pin
DaveyM6916-Sep-10 2:23
professionalDaveyM6916-Sep-10 2:23 
GeneralRe: Pass incoming data from Child to parent Form Pin
Pete O'Hanlon16-Sep-10 6:45
mvePete O'Hanlon16-Sep-10 6:45 

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.