Forms and lebels

A

Allen Maki

Hi Everybody,



I am new to Famework Programming and I need your help.



In Visual C++ .NET

Forms.

Labels.



If I want to add XXXX to the label, I can do that through the "Text"
property in the property editor. But I want to add the XXXX during run
time. In other words I want the label to be written during run time.



void InitializeComponent(void)

{

//

// label2

//

this->label2->Location = System::Drawing::point(32,16);

this->label2->Name = S"label2";

this->label2->Size = System::Drawing::Size(208, 23);

this->label2->TabIndex = 6;

this->label2->Text = S"XXXX";

}
 
C

Cor Ligthert [MVP]

Allen,

You have to add the label to your form, probably

form->Controls->Add(label2);

Cor
 
A

Allen Maki

Hi Cor,
Thanks a lot.
Can you give more details, such as, where to put the code.
 

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