窗体放picutre1图片控件和command1命令控件。
Private Sub Command1_Click()
Picture1.BackColor = vbBlack '图片黑背景
Picture1.DrawWidth = 10
'画线宽度
Picture1.ForeColor = vbRed
Picture1.Line (0, 0)-(2000, 2000), , BF '画红色前景框
Picture1.ForeColor = vbCyan
Picture1.Line (1800, 0)-(1800, 2000) '画蓝色竖线线
Picture1.ForeColor = vbGreen
Picture1.Line (0, 1800)-(2000, 1800) '画红色横线
Picture1.ForeColor = vbYellow
Picture1.Line (0, 0)-(2000, 2000) '画黄色斜线
End Sub
[此贴子已经被作者于2018-4-19 16:59编辑过]