VB里,在picturebox画曲线,把它autoredraw设为true,picturebox老闪烁,怎么办?

以下是代码,希望大家帮我看看,怎没办?先谢谢大家Picture1.Scale(0,Picture1.ScaleHeight)-(Picture1.ScaleWidth,0... 以下是代码,希望大家帮我看看,怎没办?先谢谢大家

Picture1.Scale (0, Picture1.ScaleHeight)-(Picture1.ScaleWidth, 0)
Line1(0).X1 = 0 '画横网格
Line1(0).X2 = Picture1.Width
Line1(0).Y1 = Picture1.Height / 22 - 15
Line1(0).Y2 = Picture1.Height / 22 - 15
For i = 1 To 20
Load Line1(i)
'Line1(i).BorderWidth = 1
Line1(i).X1 = 0
Line1(i).X2 = Picture1.Width
Line1(i).Y1 = (i + 1) * Picture1.Height / 22 - 15
Line1(i).Y2 = (i + 1) * Picture1.Height / 22 - 15
Line1(i).Visible = -1
Next i
Line2(0).X1 = Picture1.Width / 50 - 15 '画纵网格
Line2(0).X2 = Picture1.Width / 50 - 15
Line2(0).Y1 = 0
Line2(0).Y2 = Picture1.Height
For j = 1 To 51
Load Line2(j)
'Line2(j).BorderWidth = 1
Line2(j).X1 = (j + 1) * Picture1.Width / 50 - 15
Line2(j).X2 = (j + 1) * Picture1.Width / 50 - 15
Line2(j).Y1 = Line2(j - 1).Y1
Line2(j).Y2 = Line2(j - 1).Y2
Line2(j).Visible = -1
Next j
‘画实时曲线,当横坐标(时间)超过1小时,坐标值自动再加1小时,如此循环
Picture1.Scale (TimNO1A_QX_XH * 3 * 3600, 11)-((TimNO1A_QX_XH + 1) * 3 * 3600, 0)
Picture1.DrawWidth = 1
TimNO1A_QX_count = TimNO1A_QX_count + 1
NO1_DataSaveName_Count = NO1_DataSaveName_Count + 1
x_tim = TimNO1A_QX_count
y_NO1 = Val(Text1.Text)
y_NO2 = Val(Text12.Text)
y_NO3 = Val(Text18.Text)
Text23.Text = TimNO1A_QX_count
Text22.Text = TimNO1B_QX_count
Picture1.PSet (x_tim, y_NO1), RGB(255, 0, 0)
Picture1.PSet (x_tim, y_NO2), RGB(0, 255, 0)
Picture1.PSet (x_tim, y_NO3), RGB(0, 0, 255)
If x_tim >= (TimNO1A_QX_XH + 1) * 3 * 3600 Then
Label44(0).Caption = t2
Label45.Caption = t3
Label44(1).Caption = L3
Label44(2).Caption = L4
Label44(3).Caption = L5
Label44(4).Caption = L6
TimNO1_Cls_Tim
TimNO1B_QX_count = TimNO1A_QX_count
TimNO1B_QX_XH = TimNO1A_QX_XH
TimNO1A_QX.Enabled = False
TimNO1B_QX.Enabled = True
End If
End Sub
Private Sub TimNO1B_QX_Timer()
Dim x_tim As Single
Dim y_NO1 As Single
Dim y_NO2 As Single
Dim y_NO3 As Single
Picture1.Scale (TimNO1B_QX_XH * 3 * 3600, 11)-((TimNO1B_QX_XH + 1) * 3 * 3600, 0)
Picture1.DrawWidth = 1
TimNO1B_QX_count = TimNO1B_QX_count + 1
x_tim = TimNO1B_QX_count
y_NO1 = Val(Text1.Text)
y_NO2 = Val(Text12.Text)
y_NO3 = Val(Text18.Text)

Picture1.PSet (x_tim, y_NO1), RGB(255, 0, 0)
Picture1.PSet (x_tim, y_NO2), RGB(0, 255, 0)
Picture1.PSet (x_tim, y_NO3), RGB(0, 0, 255)
If TimNO1B_QX_count >= (TimNO1B_QX_XH + 1) * 3 * 3600 Then
TimNO1_Cls_Tim
TimNO1B_QX.Enabled = False
TimNO1A_QX.Enabled = True
End If
End Sub
Private Sub TimNO1_Cls_Tim()
Picture1.Cls
TimNO1_Cls.Enabled = False
TimNO1A_QX_XH = TimNO1A_QX_XH + 1
End Sub
展开
 我来答
若以下回答无法解决问题,邀请你更新回答
是小白啊2k
2011-08-04 · TA获得超过2566个赞
知道小有建树答主
回答量:1183
采纳率:0%
帮助的人:1160万
展开全部
你这代码不全啊,能否把工程发给我55423234@qq.com
本回答被提问者采纳
已赞过 已踩过<
你对这个回答的评价是?
评论 收起
收起 1条折叠回答
推荐律师服务: 若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询

为你推荐:

下载百度知道APP,抢鲜体验
使用百度知道APP,立即抢鲜体验。你的手机镜头里或许有别人想知道的答案。
扫描二维码下载
×

类别

我们会通过消息、邮箱等方式尽快将举报结果通知您。

说明

0/200

提交
取消

辅 助

模 式