English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
所有分類

如何在VB表單上繪製西洋棋?
9*9的方塊~要黑白相隔的!

2006-05-15 12:08:04 · 3 個解答 · 發問者 東琳 1 in 電腦與網際網路 程式設計

3 個解答

Private Sub Form_Activate()Dim I&, J&, W&, H&, C&AutoRedraw = TrueW = ScaleWidth \ 8: H = ScaleHeight \ 8 '8*8'W = ScaleWidth \ 9: H = ScaleHeight \ 9 '9*9C = vbWhiteFor I = 0 To Me.ScaleWidth - W Step W    For J = 0 To Me.ScaleHeight - H Step H        Me.Line (I, J)-(I + W, J + H), C, BF        If C Then           C = 0        Else           C = vbWhite        End If    Next    If C Then       C = 0    Else       C = vbWhite    End IfNextEnd Sub

2006-05-15 16:38:34 · answer #1 · answered by W.J.S. 7 · 0 0

西洋棋應該是8*8的方塊吧!

2006-05-15 15:45:03 · answer #2 · answered by puzzlez 4 · 0 0

可以用Text物件陣列作..

2006-05-15 13:44:16 · answer #3 · answered by ? 6 · 0 0

fedest.com, questions and answers