各位高手幫我看看,為甚麼畫的方形顯示不出來,是不是和位數,picturebox的currentX,currentY屬性有關,界面只有一個picturebox控件,請給我詳細回答一下,不勝感激!tanks!
Private Sub Form_Load()
Dim cell_width As Integer
Dim cell_height As Integer
Dim i As Integer
Dim die_count As Integer
Dim a(1 To 26) As Integer
die_count = 25
cell_width = Picture1.Width / die_count
cell_height = Picture1.Height / 10
sum = 0
For i = 1 To 25
a(i) = i
sum = sum + a(i)
Next i
Picture1.AutoRedraw = True
Picture1.DrawWidth = 2
For i = 1 To 25
Picture1.Line (i * cell_width - 50, a(i) * 1000 + 50)-(i * cell_width + 50, a(i) * 1000 - 50), vbRed, BF
Next i
End Sub
Private Sub Form_Load()
Dim cell_width As Integer
Dim cell_height As Integer
Dim i As Integer
Dim die_count As Integer
Dim a(1 To 26) As Integer
die_count = 25
cell_width = Picture1.Width / die_count
cell_height = Picture1.Height / 10
sum = 0
For i = 1 To 25
a(i) = i
sum = sum + a(i)
Next i
Picture1.AutoRedraw = True
Picture1.DrawWidth = 2
For i = 1 To 25
Picture1.Line (i * cell_width - 50, a(i) * 1000 + 50)-(i * cell_width + 50, a(i) * 1000 - 50), vbRed, BF
Next i
End Sub
解决方案 »
- NEAX2000交换机数据接口
- 帮忙看看这个错误?
- 100求解:提示:找不到原文件 'D:\包\\@DBRPRCHS.DLL来安装,如何解决?谢谢
- 一个字段,存储序号,1 2 3 4 5 ...怎样使删除后的记录序号仍然是这样?有什么好办法呢?
- 关于捕获控件的问题
- vb怎么样停止一个设备的运行啊?
- 我的大部分问题都以解决,还有问题,就是form不要边框,Label和form一样大,那样的话没法选中form移动,能否点着label移动呀?
- 有何办法?
- 怎样改变msgbox消息框的字体大小!
- VB7真的让我太失望了!
- 请指教:timer中不能使用adodc的refresh方法
- TreeView的焦点获得问题..如果使其获取不了焦点...!
autoredraw=ture 看看怎么样
或者代码
autoredraw=false
代码放在Form_Paint里面
这两个坐标谁大阿?换一下试试