modifying control properties !!

V

vishal.nagota

when I create a simple form application project in vc++ express

I have these two files created by default,

form1.h & project_name.cpp

now suppose i add a text box in form1

I'm not able to change the properties like text of this textbox from
anywhere else other then form1.h (say if i want to change properties
from this file project_name.cpp)

its a very basic doubt but I've done evrything from making textbox
public to anything wierd possible :(

please help

tia
--
 
B

Bruno van Dooren

when I create a simple form application project in vc++ express
I have these two files created by default,

form1.h & project_name.cpp

now suppose i add a text box in form1

I'm not able to change the properties like text of this textbox from
anywhere else other then form1.h (say if i want to change properties
from this file project_name.cpp)

If you added the textbox in your form and make it public, you can write text
into it like this:

//this is from my cpp file.

Form1 ^myForm = gcnew Form1();
myForm->textBox1->Text = "test";
Application::Run(myForm);


--

Kind regards,
Bruno.
(e-mail address removed)
Remove only "_nos_pam"
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top