By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,984 Members | 1,045 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,984 IT Pros & Developers. It's quick & easy.

modifying control properties !!

P: n/a
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
--

Mar 15 '06 #1
Share this Question
Share on Google+
2 Replies


P: n/a
> 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.
br**********************@hotmail.com
Remove only "_nos_pam"
Mar 16 '06 #2

P: n/a
yup.. thanks i got it now.. i was using form1 as class :)

Mar 16 '06 #3

This discussion thread is closed

Replies have been disabled for this discussion.