求解一段VB代码

0

'移动Flow图形
Private Sub FlowMoveImg(ImgIdx As Integer, ImgValue As String, ShowIndex As Integer, ShowTime As Date, ShowLab As String)
Dim iSum As Integer, MyHeight As Single, i As Integer, ChkFIN() As String, StrH As Single

iSum = ImgIdx

MyFShowIdx = ShowIndex

For i = 0 To LastShow
If ShowAdd(i) = CStr(MyFShowIdx) Then MyFShowIdx = MyFShowIdx + 1        '不让图形重叠
Next
'移动
'ImgFlow(iSum).Move (PicFlow.Width / LineSum) * MyFShowIdx - (ImgFlow(iSum).Width / 2), (PicFlow.Height - ImgFlow(iSum).Height) / 2 - 30
ImgFlow(iSum).Move (PicFlow.Width / LineSum) * MyFShowIdx - (ImgFlow(iSum).Width / 2), PicFlow.Height
ImgFlow(iSum).ToolTipText = ShowTime & "  " & ImgValue
ImgFlow(iSum).Visible = True

LabFName(iSum).BackStyle = 0
LabFName(iSum).Width = Abs(PicFlow.TextWidth("好"))
LabFName(iSum).Height = PicFlow.Height
LabFName(iSum).Move (PicFlow.Width / LineSum) * MyFShowIdx - (LabFName(iSum).Width / 2), PicFlow.Height - ImgFlow(iSum).Height
LabFName(iSum).ToolTipText = ShowTime & "  " & ImgValue
LabFName(iSum).FontSize = 8

If ShowLab = "0" Then
LabFName(iSum).Visible = True
Else
If ShowLab = "5" Then
If InStr(ImgValue, "置管") <> 0 Then
ChkFIN = Split(ImgValue, "置管")
ImgValue = Replace(ImgValue, "置管", "         ")
StrH = Len(ChkFIN(0)) * Abs(PicFlow.TextHeight("好"))

LabFName(iSum).Move (PicFlow.Width / LineSum) * MyFShowIdx - (LabFName(iSum).Width / 2), PicFlow.Height
ImgFlow(iSum).Move (PicFlow.Width / LineSum) * MyFShowIdx - (ImgFlow(iSum).Width / 2), PicFlow.Height - StrH
End If

LabFName(iSum).Visible = True

Else
LabFName(iSum).Visible = False
End If
End If

LabFName(iSum).Caption = ImgValue

If FlowLock = True Then
ImgFlow(iSum).Enabled = False
LabFName(iSum).Enabled = False
Else
ImgFlow(iSum).Enabled = True
LabFName(iSum).Enabled = True
End If

ShowAdd(ImgIdx) = MyFShowIdx           '记住要秀的位置

LastShow = ImgIdx
End Sub

0

twistting | 小虾三级 |园豆：575 | 2013-06-06 14:55

@普通用户: 纳尼？神马系统，我上一家公司也是让我把VB的erp改成C#的，本来我是打算干下去的，可是后来由于其他原因没干下去，不过你可以试试

twistting | 园豆：575 (小虾三级) | 2013-06-11 09:59

您需要登录以后才能回答，未注册用户请先注册