VB高手进!!急!!!

来源:百度知道 编辑:UC知道 时间:2024/06/01 21:12:01
下面的程序是设计三角函数的代码,但无法自动演示,请问错误在哪???
Option Explicit
Const dw As Integer = 400
Const picw = 9000
Const pich = 7000
Dim a As Integer
Dim w As Integer
Dim f As Single
Public Sub drawzbz()
pic.ForeColor = QBColor(0)
pic.Line (picw / 2, 0)-(picw / 2, pich)
pic.Line (0, pich / 2)-(picw, pich / 2)

End Sub

Private Sub csza_Change()
a = csza.Value
csa.Caption = "A=" + Str(a)

End Sub

Private Sub cszf_Change()
f = cszf.Value
csf.Caption = "f=" + Str(f)
End Sub

Private Sub cszw_Change()
w = cszw.Value
csw.Caption = "w=" + Str(w)

End Sub

Private Sub Form_Load()
Form1.Show
Call drawzbz
selec.BackColor = QBColor(0)
a = 1
w = 1
f = 0

End Sub
Public Sub drawhs(a As Integer, w As Integer, f As Single, c As Integer)
Dim sd As Single
Dim i As Single
Dim

经仔细查看你的代码,未发现明显错误,估计你用的图片框pic其属性AutoRedraw未设置为TRUE而造成没显示。
另外从那些按钮的Click事件看,不知你是否在窗体上添加了那些按钮控件并正确命名。

贴Form1内容上来.现在这样不能判断.不过你Load中的确没啥呀,没什么自动的代码.