Click here to Skip to main content
15,907,183 members
Home / Discussions / C#
   

C#

 
QuestionNew Combobox Challenge! Pin
SpeBeeTo18-Dec-05 7:21
SpeBeeTo18-Dec-05 7:21 
QuestionHow set new system date and time in .NET Framework? Pin
Andrey_Mark18-Dec-05 4:39
Andrey_Mark18-Dec-05 4:39 
AnswerRe: How set new system date and time in .NET Framework? Pin
Colin Angus Mackay18-Dec-05 5:16
Colin Angus Mackay18-Dec-05 5:16 
GeneralRe: How set new system date and time in .NET Framework? Pin
Andrey_Mark21-Dec-05 8:11
Andrey_Mark21-Dec-05 8:11 
QuestionInteract Pin
nc3b18-Dec-05 4:23
nc3b18-Dec-05 4:23 
AnswerRe: Interact Pin
Colin Angus Mackay18-Dec-05 5:11
Colin Angus Mackay18-Dec-05 5:11 
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 
Hello,

I am stuck with an error: An object reference is required for the nonstatic field, method, or property


the code that is causing the problem:
-class Form1
private static DiscoveryProcess DPform;
public static bool DiscoveryProcessInstance = false;

public static void DiscoveryProcess()
{
if (DiscoveryProcessInstance == false)
{
DPform = new DiscoveryProcess();
DPform.Show();
DiscoveryProcessInstance = true;
-ERROR- toolStripStatusLabel1.Visible = true; // System.Windows.Forms.ToolStripStatusLabel
}
else
DPform.WindowState = FormWindowState.Normal;
}

situation:
Form1 is the mainform, from there I start a new Windows form, Form2. When the operation are done on that Form2, I call the following code to start another Windows form DPform
-class Form2
Form1.DiscoveryProcess(); //starts DPform
this.Close(); // closes Form2

Now what I want to accomplish with that is that i can close the form Form2 (I don't need it anymore) without closing DPform and that only one single window form can be created. But what i want to do is set a toolStripStatusLabel on Form1 to visible.

Can someone point me into a direction of how to manipulate the toolStripStatusLabel on another form? Or is my approach of calling new window forms from Form1 not correct?

Thanks in advance.


-- modified at 8:06 Sunday 18th December, 2005
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 
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 

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.