Forms and lebels

  • Thread starter Thread starter Allen Maki
  • Start date Start date
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";

}
 
Allen,

You have to add the label to your form, probably

form->Controls->Add(label2);

Cor
 
Back
Top