扫一扫
分享文章到微信
扫一扫
关注官方公众号
至顶头条
Picture1 .ScaleMode = 1 ‘以VB的基本单位作为建立坐标轴以及绘制图形的单位; Picture1.Refresh Picture1.CurrentX = Picture1.ScaleLeft +100 Picture1.CurrentY = Picture1.ScaleTop Picture1.Print Picture1.ScaleHeight - 100 Picture1.Line(Picture1.ScaleLeft+100,Picture1.ScaleTop+100)-(Picture1.ScaleLeft+100, Picture1.ScaleHeight - 100) Picture1.CurrentX = Picture1.ScaleLeft +100 Picture1.CurrentY = Picture1.ScaleHeight Picture1.Print “(0,0)” Picture1.Line (Picture1.ScaleLeft + 100, Picture1.ScaleHeight - 100)-(Picture1.ScaleWidth - 100, Picture1.ScaleHeight - 100) Picture1.CurrentX = Picture1.ScaleWidth Picture1.CurrentY = Picture1.ScaleHeight Picture1.Print Picture1.ScaleWidth-100 Picture1.AutoRedraw = True ‘必要时,用存储在内存中的图象进行重绘 |
Picture1.Line (Picture1.ScaleLeft, CInt(Picture1.ScaleHeight / 2))-(Picture1.ScaleWidth, CInt(Picture1.ScaleHeight / 2)) ‘绘制中线 Private Sub Timer1_Timer() Dim y1 As Integer y1 = CInt(Sin((x - Picture1.Left) / 20 / 180 * pi) * Picture1.ScaleHeight / 2) y1 = CInt((Picture1.ScaleHeight + 1000) / 2) - y1 Picture1.Line (x, y)-(x + 20, y1) x = x + 20 y = y1 If x >= Picture1.ScaleWidth Then SavePicture Picture1.Image, "c:\sin.bmp" ‘保存图画,可以根据实际需要命名图片 x = 0 y = Picture1.ScaleHeight / 2 Picture1.Cls ‘清屏重画 End If End Sub |
如果您非常迫切的想了解IT领域最新产品与技术信息,那么订阅至顶网技术邮件将是您的最佳途径之一。
现场直击|2021世界人工智能大会
直击5G创新地带,就在2021MWC上海
5G已至 转型当时——服务提供商如何把握转型的绝佳时机
寻找自己的Flag
华为开发者大会2020(Cloud)- 科技行者