能产生国际象棋棋盘的vb代码
展开全部
Private Sub Form_Load()
Show
Dim I, J ' 声明变量。
ScaleMode = 6 ' 设置 ScaleMode 为像素。
DrawWidth = 2 ' 设置 DrawWidth。
Me.ForeColor = vbBlue
For I = 1 To 9
Line (20, 20 * I)-(180, 20 * I)
Next
For I = 1 To 9
Line (20 * I, 20)-(20 * I, 180)
Next
For J = 0 To 4
For I = 1 To 4
Line (I * 40, J * 40 + 40)-Step(20, 20), , BF
Next
Next
For I = 0 To 3
Line (20 + I * 40, 60)-Step(20, 20), , BF
Next
For J = 0 To 3
For I = 0 To 3
Line (20 + I * 40, 20 + J * 40)-Step(20, 20), , BF
Next
Next
End Sub
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询