VB 用户定义类型未定义,错误。
PrivateSubTChart1_OnMouseMove(ByValShiftAsTeeChart.EShiftState,ByValXAsLong,ByValYAsL...
Private Sub TChart1_OnMouseMove(ByVal Shift As TeeChart.EShiftState, ByVal X As Long, ByVal Y As Long)
Static i1 As Integer
Static C1 As Double
Static T As Boolean
Dim lh As String, xh As Integer, WD As Integer
Dim i As Integer, j As Integer
i = TChart1.Series(0).Clicked(X, Y)
If i > -1 Then
If i1 <> i Then
If Not T Then
T = True
C1 = TChart1.Series(0).PointColor(i)
Else
TChart1.Series(0).PointColor(i1) = C1 'IIf(C1 = 0, TChart1.Series(0).PointColor(I1), C1)
End If
TChart1.Series(0).PointColor(i1) = C1
'浮动提示
Labwd.Visible = True
C1 = TChart1.Series(0).PointColor(i)
j = InStr(1, TChart1.Series(0).PointLabel(i), "/")
lh = Mid(TChart1.Series(0).PointLabel(i), 1, j - 1)
xh = Mid(TChart1.Series(0).PointLabel(i), j + 1)
Labwd.Caption = "炉号:" & lh & Chr(13) & "序号:" & xh & "#" & Chr(13) & "温度:" & TChart1.Series(0).PointValue(i) & "℃"
'浮动提示标签定位
If X > 843 Then
Labwd.Left = TChart1.MousePosition.X * 15.05 - Labwd.Width
Else
Labwd.Left = TChart1.MousePosition.X * 15.05 + 250
End If
Labwd.Top = TChart1.MousePosition.Y * 15.05 - 1000
'坐标离开后,颜色还原
TChart1.Series(0).PointColor(i) = &HFF00&
i1 = i
End If
Else
Labwd.Visible = False
End If
End Sub 展开
Static i1 As Integer
Static C1 As Double
Static T As Boolean
Dim lh As String, xh As Integer, WD As Integer
Dim i As Integer, j As Integer
i = TChart1.Series(0).Clicked(X, Y)
If i > -1 Then
If i1 <> i Then
If Not T Then
T = True
C1 = TChart1.Series(0).PointColor(i)
Else
TChart1.Series(0).PointColor(i1) = C1 'IIf(C1 = 0, TChart1.Series(0).PointColor(I1), C1)
End If
TChart1.Series(0).PointColor(i1) = C1
'浮动提示
Labwd.Visible = True
C1 = TChart1.Series(0).PointColor(i)
j = InStr(1, TChart1.Series(0).PointLabel(i), "/")
lh = Mid(TChart1.Series(0).PointLabel(i), 1, j - 1)
xh = Mid(TChart1.Series(0).PointLabel(i), j + 1)
Labwd.Caption = "炉号:" & lh & Chr(13) & "序号:" & xh & "#" & Chr(13) & "温度:" & TChart1.Series(0).PointValue(i) & "℃"
'浮动提示标签定位
If X > 843 Then
Labwd.Left = TChart1.MousePosition.X * 15.05 - Labwd.Width
Else
Labwd.Left = TChart1.MousePosition.X * 15.05 + 250
End If
Labwd.Top = TChart1.MousePosition.Y * 15.05 - 1000
'坐标离开后,颜色还原
TChart1.Series(0).PointColor(i) = &HFF00&
i1 = i
End If
Else
Labwd.Visible = False
End If
End Sub 展开
2个回答
展开全部
TChart1使用的是什么部件? 如果是Mirsoft Chart Control
那么他没有onMouseMove动作,只有
Private Sub TChart1_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
那么他没有onMouseMove动作,只有
Private Sub TChart1_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询