搜索
首页 电脑/网络 程序设计 VB

怎样用vb画函数图像?

怎么用VB画数学的函数图像,比如二次函数?

全部回答

2018-03-31

0 0

    Option Explicit Dim i As Integer Dim yy(100) As Single Dim xx As Single Dim colvb As Long Dim x As Integer Dim y As Integer Dim txt As String Dim dy As Variant Public Function xp(colvb As Variant, x As Variant, y As Variant, txt As Variant) Me。
    ForeColor = colvb 'QBColor(14) Me。CurrentX = x Me。CurrentY = y Me。Print txt ' End Function Private Sub Command1_Click() For i = 0 To 100 xx = (i - 50) / 10 yy(i) = 0。
    5 * xx ^ 2 + 3 * xx - 2 Next Line (0, 4000)-(10000, 4000) Line (5000, 0)-(5000, 8000) Line (6000, 3950)-(6000, 4000) Line (4000, 3950)-(4000, 4000) Line (5000, 3000)-(5100, 3000) Line (5000, 5000)-(5100, 5000) For i = 0 To 100 PSet ((i - 50) * 10 + 5000, -1 * yy(i) * 100 + 4000), vbRed Next x = 9000 y = 3900 txt = "X轴" colvb = vbBlue dy = xp(colvb, x, y, txt) x = 5100 y = 500 txt = "y轴" colvb = vbBlue dy = xp(colvb, x, y, txt) x = 5000 y = 4000 txt = "0" dy = xp(colvb, x, y, txt) x = 6000 - 70 y = 4000 txt = "10" dy = xp(colvb, x, y, txt) x = 4000 - 70 y = 4000 txt = "-10" dy = xp(colvb, x, y, txt) x = 5100 y = 2930 txt = "10" dy = xp(colvb, x, y, txt) x = 5100 y = 4930 txt = "-10" dy = xp(colvb, x, y, txt) End Sub 。
    。

类似问题换一批

热点推荐

热度TOP

相关推荐
加载中...

热点搜索 换一换

电脑/网络
VB
硬件
电脑装机
程序设计
互联网
操作系统/系统故障
笔记本电脑
反病毒
百度
软件
程序设计
VB
数据库
C/C++
汇编语言
JAVA相关
VC++
C#/.NET
其他编程语言
VB
VB
举报
举报原因(必选):
取消确定举报