7,539
社区成员
发帖
与我相关
我的任务
分享For Each a As Control In Me.Controls
If TypeOf (a) Is Label Then
a.Text = K
End If
Next
System::Windows::Forms::Label lbl;
for (int i=0;i<this->Controls->Count;i++)
{
if (this->Controls[i]->GetType()==lbl.GetType())
{
this->Controls[i]->Text=L"123";//如果不是unicode编码则去掉L
}
}
for(int i=0; i<this->Controls->Count; i++)
{
if(this->Controls[i]->GetType()->ToString() == "System.Windows.Forms.Label")
{
//......
}
}
for ( int i =0; i < this->Controls->Count ;i++)
{
System::Windows::Forms ::MessageBox::Show (i.ToString ());
}