Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- '20141115 Control Array Example
- 'Maker : Yan
- 'E-Mail : [email protected]
- 'Date : 2014/11/15 pm.11:00
- 'Form 表單內含
- ''Textbox * 6 (Textbox1 ~ Textbox6)
- ''Button * 1 (Button1)
- '本範例是採控制項陣列(Contral Array)
- '利用控制項陣列,以迴圈控制Textbox.Text 的值
- Public Class Form1
- Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
- Dim textbox_array() As TextBox = New TextBox() {TextBox1, TextBox2, _
- TextBox3, TextBox4, _
- TextBox5, TextBox6}
- For i As Integer = 0 To textbox_array.Length - 1 Step 1
- textbox_array(i).Text = i.ToString
- Next
- End Sub
- End Class
Advertisement
Add Comment
Please, Sign In to add comment