Can't see textbox control

  • Thread starter Thread starter tshad
  • Start date Start date
T

tshad

This makes not sense at all.

I created a textbox on my screen and set the name property to "Status".

If I double click on the textbox, it goes to the code page and shows:

private void Status_TextChanged(object sender, EventArgs e)
{

}

So obviously, it sees the object.

But in my code I have:

Status.Text += String.Format("Opening
{0}\n",Path.GetFileName(strFile));

And I get the following error:

An object reference is required for the nonstatic field, method, or property
'FileProcess.'FileProcess.Status'

How can that be????

In my FileProcess designer page I have:

private System.Windows.Forms.Button button1;
private System.Windows.Forms.TextBox Status;
private System.Windows.Forms.Label label1;

So obviously the object is there.

Thanks,

Tom
 
I found the problem.

I had function set a static (as it came from another program where it needed
to be static).

When I took the static off, it disappears.

Not sure why that would be a problem.

Thanks,

Tom
 
Back
Top