Click here to Skip to main content
15,906,645 members
Home / Discussions / C#
   

C#

 
GeneralRe: Interact Pin
nc3b19-Dec-05 7:19
nc3b19-Dec-05 7:19 
QuestionAn object reference is required for the nonstatic field, method, or property Pin
ESTAN18-Dec-05 1:48
ESTAN18-Dec-05 1:48 
AnswerRe: An object reference is required for the nonstatic field, method, or property Pin
S. Senthil Kumar18-Dec-05 2:03
S. Senthil Kumar18-Dec-05 2:03 
GeneralRe: An object reference is required for the nonstatic field, method, or property Pin
ESTAN18-Dec-05 2:06
ESTAN18-Dec-05 2:06 
GeneralRe: An object reference is required for the nonstatic field, method, or property Pin
S. Senthil Kumar18-Dec-05 2:11
S. Senthil Kumar18-Dec-05 2:11 
GeneralRe: An object reference is required for the nonstatic field, method, or property Pin
ESTAN18-Dec-05 2:14
ESTAN18-Dec-05 2:14 
GeneralRe: An object reference is required for the nonstatic field, method, or property Pin
S. Senthil Kumar18-Dec-05 2:22
S. Senthil Kumar18-Dec-05 2:22 
GeneralRe: An object reference is required for the nonstatic field, method, or property Pin
ESTAN18-Dec-05 2:48
ESTAN18-Dec-05 2:48 
That is correct, but the problem that I have is this.

I make a new clean static ToolStripStatusLabel.
public static System.Windows.Forms.ToolStripStatusLabel testLabel;

This new ToolStripStatusLabel must be added to the
System.Windows.Forms.StatusStrip statusStrip1;

So I do
try
{
this.statusStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { testLabel });
}
catch (Exception) // needed to catch the System.ArgumentNullException
{ }

Than when I change the section that gave the error to:
public static void DiscoveryProcess()
{
if (DiscoveryProcessInstance == false)
{
DPform = new DiscoveryProcess();
DPform.Show();
DiscoveryProcessInstance = true;
//statusDiscoveryProcess.Visible = true;
testLabel.Image = global::RDXstudio.Properties.Resources.Processor;
testLabel.Name = "statusDiscoveryProcess";
testLabel.Size = new System.Drawing.Size(161, 16);
testLabel.Text = "Discovery Process running...";
testLabel.Visible = true;
}
else
DPform.WindowState = FormWindowState.Normal;
}

It still causes the application to crash with a System.NullReferenceException
I think I am not able to do that.
Is there another way of calling my forms without the static?
Form1 calls Form2, Form2 calls DPform and Form2 close itself, DPform continue...

Thanks in advance.
GeneralRe: An object reference is required for the nonstatic field, method, or property Pin
S. Senthil Kumar18-Dec-05 2:52
S. Senthil Kumar18-Dec-05 2:52 
AnswerRe: An object reference is required for the nonstatic field, method, or property Pin
ESTAN18-Dec-05 3:06
ESTAN18-Dec-05 3:06 
GeneralRe: An object reference is required for the nonstatic field, method, or property Pin
Guffa18-Dec-05 2:07
Guffa18-Dec-05 2:07 
GeneralRe: An object reference is required for the nonstatic field, method, or property Pin
S. Senthil Kumar18-Dec-05 2:10
S. Senthil Kumar18-Dec-05 2:10 
AnswerRe: An object reference is required for the nonstatic field, method, or property Pin
Guffa18-Dec-05 2:12
Guffa18-Dec-05 2:12 
Question.NET Framework installation Pin
mehrdadc4818-Dec-05 1:42
mehrdadc4818-Dec-05 1:42 
Questionsend structure through socket? Pin
pakFari17-Dec-05 23:42
pakFari17-Dec-05 23:42 
AnswerRe: send structure through socket? Pin
Gilad Kapelushnik17-Dec-05 23:47
Gilad Kapelushnik17-Dec-05 23:47 
AnswerRe: send structure through socket? Pin
tarasn19-Dec-05 23:16
tarasn19-Dec-05 23:16 
Questiondelegate Pin
fmardani17-Dec-05 22:25
fmardani17-Dec-05 22:25 
AnswerRe: delegate Pin
Colin Angus Mackay17-Dec-05 23:44
Colin Angus Mackay17-Dec-05 23:44 
QuestionEmail via Outlook ? Pin
Christian Graus17-Dec-05 21:56
protectorChristian Graus17-Dec-05 21:56 
AnswerRe: Email via Outlook ? Pin
S. Senthil Kumar18-Dec-05 2:07
S. Senthil Kumar18-Dec-05 2:07 
GeneralRe: Email via Outlook ? Pin
ekynox18-Dec-05 9:33
ekynox18-Dec-05 9:33 
AnswerRe: Email via Outlook ? Pin
Michael P Butler18-Dec-05 3:12
Michael P Butler18-Dec-05 3:12 
AnswerRe: Email via Outlook ? Pin
Kevin McFarlane18-Dec-05 5:26
Kevin McFarlane18-Dec-05 5:26 
AnswerRe: Email via Outlook ? Pin
mav.northwind18-Dec-05 8:59
mav.northwind18-Dec-05 8:59 

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.