Bekijk de onderstaande video om te zien hoe je onze site als een web app op je startscherm installeert.
Opmerking: Deze functie is mogelijk niet beschikbaar in sommige browsers.
Dim ctrl As Control, i As Integer, s As String
i = 2 '
s = "Text"
For Each ctrl In Form1
If TypeOf ctrl Is TextBox Then
If ctrl.Name = s + CStr(i) Then
MsgBox s + CStr(i)
i = i - 1
End If
End If
Next
Option Strict On
Public Class Form1
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim s As String = "TextBox"
Dim ctrl As Control
Dim i As Integer = 3
For Each ctrl In Me.Controls
If TypeOf ctrl Is TextBox Then
If ctrl.Name = s + CStr(i) Then
MsgBox(s + CStr(i))
i -= 1
End If
End If
Next
End Sub
End Class
Option Strict On
Public Class Form1
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim s As String = "TextBox"
Dim ctrl As Control
Dim i As Integer = 3
For Each ctrl In Me.Controls
If TypeOf ctrl Is TextBox Then
If ctrl.Name = s + CStr(i) Then
Dim myObj As Control = New System.Windows.Forms.TextBox
myObj.Text = "BLAH" '<< dat gaat dus niet :(
i -= 1
End If
End If
Next
End Sub
End Class
We gebruiken essentiële cookies om deze site te laten werken, en optionele cookies om de ervaring te verbeteren.