当PICTURE中的点与一数组对应,通过数组来划画和画棋子,算法很简单的
解决方案 »
- 如何实现VB和excel动态数据采集显示?
- 在多选时,怎样使Listview不自动选择默认选项
- VB编译时提示 许可证信息没找到 怎么办
- 这样超级简单的问题都30分,我懒得试了(嘿嘿)。
- 关于文件名(有答复立刻结贴)(在线等..)
- 问一关于视频流格式的问题!(不够可以加分)
- vb+sqlserver2000打包安装问题
- 求一条日期sql语句,在线...
- 如何限制客户端用户数量?
- √求救!我做一个大型管理软件,有许多人共同开发。做源程序经常需要改动,但改动一次就要花十几分钟编译程序,请问能是否能够写脚本,让
- VB编程怎样实现清除IE历史记录。。。
- 到那里能找到wininet.dll及ie内河的api声明及介绍?
Private Sub Picture1_Click()Dim i As Long
TableWidth = Picture1.ScaleWidth / 20
Picture1.Height = TableWidth * 20 + 100
For i = 1 To 10
Picture1.Line (TableWidth, i * TableWidth)-(10 * TableWidth, i * TableWidth)
Picture1.Line (i * TableWidth, TableWidth)-(i * TableWidth, 10 * TableWidth)
Next i
End Sub
Dim TableWidth As LongPrivate Sub Form_Load()
Picture1.AutoRedraw = True
Picture1.FillStyle = 0
Dim i As Long
TableWidth = Picture1.ScaleWidth / 20
Picture1.Height = TableWidth * 20 + 100
For i = 1 To 10
Picture1.Line (TableWidth, i * TableWidth)-(10 * TableWidth, i * TableWidth)
Picture1.Line (i * TableWidth, TableWidth)-(i * TableWidth, 10 * TableWidth)
Next i
End SubPrivate Sub Picture1_MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single)
Static red As Integer
red = 1 - red
If (X > TableWidth And Y > TableWidth And Y < 10 * TableWidth And X < 10 * TableWidth) Then
If red = 1 Then
Picture1.FillColor = RGB(0, 0, 0)
Else
Picture1.FillColor = RGB(255, 255, 255)
End If
Picture1.Circle (CInt(X / TableWidth) * TableWidth, CInt(Y / TableWidth) * TableWidth), TableWidth / 2
End If
End Sub
Picture1.AutoRedraw = True
Picture1.FillStyle = 0
Dim i As Long
TableWidth = Picture1.ScaleWidth / 20
Picture1.Height = TableWidth * 20 + 100
For i = 1 To 10
Picture1.Line (TableWidth, i * TableWidth)-(10 * TableWidth, i * TableWidth)
Picture1.Line (i * TableWidth, TableWidth)-(i * TableWidth, 10 * TableWidth)
Next i
End SubPrivate Sub Picture1_MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single)
Static red As Integer
red = 1 - red
If (X > TableWidth And Y > TableWidth And Y < 10 * TableWidth And X < 10 * TableWidth) Then
If red = 1 Then
Picture1.FillColor = RGB(0, 0, 0)
Else
Picture1.FillColor = RGB(255, 255, 255)
End If
Picture1.Circle (CInt(X / TableWidth) * TableWidth, CInt(Y / TableWidth) * TableWidth), TableWidth / 2
End If
End Sub
谢谢你,我下网后试试,有问题再找你。
to fst(二百五)
好的,过会我发信给你。
CSDN上有也!!!!!