Chamuanza Posted November 2, 2022 at 07:54 PM Report Share #627937 Posted November 2, 2022 at 07:54 PM Um Bem Aja a Todos Tenho este código e não sei como substituir o valor numérico do control Panel? pelo valor X do ciclo For Dim ctrl As Control For X As Integer = 1 To 10 Step 3 For Each ctrl In Panel?.Controls If TypeOf (ctrl) Is Label Then If ctrl.BackColor = Color.Yellow Then MsgBox("TESTE") RadioButton3.Checked = True Exit For End If End If Next Next Agradeço desde já a atenção Link to comment Share on other sites More sharing options...
Andrepereira9 Posted November 2, 2022 at 10:01 PM Report Share #627939 Posted November 2, 2022 at 10:01 PM Boas O que pretendes pode ser feito assim Dim ctrl As Control For X As Integer = 1 To 10 Step 3 Dim nome_painel As Panel = CType(Me.Controls("Panel" + X.ToString()), Panel) For Each ctrl In nome_painel.Controls If TypeOf (ctrl) Is Label Then If ctrl.BackColor = Color.Yellow Then MsgBox("TESTE") RadioButton3.Checked = True Exit For End If End If Next Next Next A informática chegou para resolver problemas que antes não existiam Quem ri por último é porque está conectado a 52 Kbs. Link to comment Share on other sites More sharing options...
Chamuanza Posted November 2, 2022 at 10:19 PM Author Report Share #627940 Posted November 2, 2022 at 10:19 PM Obrigado desde já pela atenção Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now