Saturday, 17 August 2013

how to change property in for loop vb.net 2010

how to change property in for loop vb.net 2010

Sorry my bad english first.
i have 12 component and i want to change value in for loop.
here my code
Dim serviceNames() As String = {"Security Manager Remote Recorder",
"Security Manager Filter", "Security Manager Prob", "Security Manager
Intelligence", "Security Manager Maintenance", "Security Manager
Action", "Security Manager Agent Check", "Security Manager Control",
"Security Manager Deploy Copy", "Security Manager Monitor", "Security
Manager Reloader", "Security Manager Schedule"}
Dim swButtons() = {sw0.Value, sw1.Value, sw2.Value, sw3.Value,
sw4.Value, sw5.Value, sw6.Value, sw7.Value, sw8.Value, sw9.Value,
sw10.Value, sw11.Value}
For q As Integer = 0 To serviceNames.Count - 1
Dim regService =
My.Computer.Registry.GetValue("HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\"
+ serviceNames(q) + "", "Start", "")
If regService = 2 Then
swButtons(q) = True
End If
If regService = 4 Then
MetroTabItem5.Text = "bu 4"
End If
Next
thanks for all helps.

No comments:

Post a Comment