Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Changing a control within a function?

Status
Not open for further replies.

Kurono

Programmer
Mar 22, 2006
4
IE
Hi!

Sorry if this is a newbie question, I'm pretty new to Microsoft Visual Studio .NET 2003.

I'm trying to write a function that (among other things) updates a textbox, and some labels. How can I do this easily? With C++ Builder 6 I could have a function like:

void changeStuff()
{
Form1->Textbox1->Text = "stuff";
Form1->Label1->Visible = true;
}

But if I try write a function like this in Visual Studio I get errors like:
"error C2065: 'Form1' : undeclared identifier"
"error C2227: left of '->Textbox1' must point to class/struct/union"
"error C2227: left of '->Text' must point to class/struct/union"

Is there any simple way to update controls within a function?

Thanks in advance!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top