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

C#

 
QuestionHow to call List[int] in other class [modified] Pin
laurisp9-Nov-09 13:57
laurisp9-Nov-09 13:57 
AnswerRe: How to call List[int] in other class Pin
Julianne_juju9-Nov-09 19:19
Julianne_juju9-Nov-09 19:19 
GeneralRe: How to call List[int] in other class Pin
laurisp9-Nov-09 21:29
laurisp9-Nov-09 21:29 
Questionnullrefererence exception Pin
hobbsjas9-Nov-09 13:31
hobbsjas9-Nov-09 13:31 
AnswerRe: nullrefererence exception Pin
Luc Pattyn9-Nov-09 14:33
sitebuilderLuc Pattyn9-Nov-09 14:33 
GeneralRe: nullrefererence exception Pin
hobbsjas9-Nov-09 15:26
hobbsjas9-Nov-09 15:26 
GeneralRe: nullrefererence exception Pin
Luc Pattyn9-Nov-09 15:31
sitebuilderLuc Pattyn9-Nov-09 15:31 
GeneralRe: nullrefererence exception Pin
hobbsjas9-Nov-09 15:53
hobbsjas9-Nov-09 15:53 
Okay, I have this in my backgroundworker now:
labeltext = "Copying " + src[cnt] + "... " + filesize1 + "KB of " + filesize2 + "KB";
                        SetText(statusStrip1, labeltext);
                        //toolStripStatusLabel1.Text = "Copying " + src[cnt] + "... " + filesize1 + "KB of " + filesize2 + "KB";


and then this later on:
public delegate void ControlStringConsumer(Control control, string text);  // defines a delegate type

        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
            }
        }


I have to pass a control to invoke it, how do I access toolstripstatuslabel1.text this way?
GeneralRe: nullrefererence exception Pin
N a v a n e e t h9-Nov-09 16:02
N a v a n e e t h9-Nov-09 16:02 
GeneralRe: nullrefererence exception Pin
Luc Pattyn9-Nov-09 16:05
sitebuilderLuc Pattyn9-Nov-09 16:05 
GeneralRe: nullrefererence exception Pin
N a v a n e e t h9-Nov-09 15:59
N a v a n e e t h9-Nov-09 15:59 
GeneralRe: nullrefererence exception Pin
hobbsjas10-Nov-09 9:25
hobbsjas10-Nov-09 9:25 
QuestionInconsistent accessibility: property type is less accessible than property Pin
Kevin Marois9-Nov-09 13:28
professionalKevin Marois9-Nov-09 13:28 
AnswerRe: Inconsistent accessibility: property type is less accessible than property Pin
J$9-Nov-09 13:36
J$9-Nov-09 13:36 
GeneralRe: Inconsistent accessibility: property type is less accessible than property Pin
Kevin Marois9-Nov-09 13:49
professionalKevin Marois9-Nov-09 13:49 
GeneralRe: Inconsistent accessibility: property type is less accessible than property Pin
Luc Pattyn9-Nov-09 13:56
sitebuilderLuc Pattyn9-Nov-09 13:56 
QuestionWin32 Message Hooks and/or Legitimate Code Injection Pin
cymblicity9-Nov-09 12:54
cymblicity9-Nov-09 12:54 
AnswerRe: Win32 Message Hooks and/or Legitimate Code Injection Pin
Luc Pattyn9-Nov-09 15:28
sitebuilderLuc Pattyn9-Nov-09 15:28 
Questionhow can i calculate shortest path between neurons in artifical neural network graph? Pin
karayel_kara9-Nov-09 12:32
karayel_kara9-Nov-09 12:32 
QuestionC# subject not correct form because of shift+enter Pin
Jacob Dixon9-Nov-09 10:45
Jacob Dixon9-Nov-09 10:45 
AnswerRe: C# subject not correct form because of shift+enter Pin
Abhishek Sur9-Nov-09 10:48
professionalAbhishek Sur9-Nov-09 10:48 
GeneralRe: C# subject not correct form because of shift+enter Pin
Jacob Dixon9-Nov-09 10:55
Jacob Dixon9-Nov-09 10:55 
GeneralRe: C# subject not correct form because of shift+enter Pin
Abhishek Sur9-Nov-09 21:37
professionalAbhishek Sur9-Nov-09 21:37 
Questionthreading access to toolstripmenuitem Pin
ToeKing9-Nov-09 10:41
ToeKing9-Nov-09 10:41 
AnswerRe: threading access to toolstripmenuitem Pin
Luc Pattyn9-Nov-09 11:37
sitebuilderLuc Pattyn9-Nov-09 11:37 

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.