標題:
[原創]
vb2010 陣列顯示的結果...
[打印本頁]
作者:
mark15jill
時間:
2012-12-5 17:27
標題:
vb2010 陣列顯示的結果...
本帖最後由 mark15jill 於 2012-12-5 17:29 編輯
vb2010 可以這樣做..
其他版本請自行研究
純屬好玩
...(其實是 陣列還沒搞好ˇˇ
[attach]13394[/attach]
Public Class Form1
Dim chbo1(97, 56) As CheckBox
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim usx1, usy1 As Integer
Dim nn As Integer
Dim fontFamily As New FontFamily("微軟正黑體")
Me.Show()
nn = 1
For usx1 = 0 To 97
For usy1 = 0 To 56
chbo1(usx1, usy1) = New CheckBox
chbo1(usx1, usy1).BackColor = Color.Aquamarine
chbo1(usx1, usy1).Width = 20
chbo1(usx1, usy1).Height = 20
chbo1(usx1, usy1).Appearance = Appearance.Button
chbo1(usx1, usy1).TextAlign = ContentAlignment.MiddleCenter
chbo1(usx1, usy1).Font = New Font(fontFamily, 14, FontStyle.Regular, GraphicsUnit.Pixel)
chbo1(usx1, usy1).Location = New Point((15 * usx1), (15 * usy1))
Me.Controls.Add(chbo1(usx1, usy1))
'chbo1(usx1, usy1).Text = chbo1(usx1, usy1).Name & "第一區塊" & Chr(10) & Chr(10) & nn
nn = nn + 1
Next
Next
'分隔線'
usx1 = Nothing
usy1 = Nothing
End Sub
End Class
複製代碼
歡迎光臨 麻辣家族討論版版 (http://forum.twbts.com/)