Dim flag As Boolean
Dim JcqX, JcqY, HgqX, HgqY As Long
Dim tempx1, tempx2, tempy1, tempy2 As Line
Private Sub Form_Load()
Dim i, j As Integer
If flag = True Then
For i = 0 To 5
ImageJcq(i).Picture = LoadPicture(App.Path + "/icon/POINT1.ico")
Lin(i).Visible = False
Next i
Else
For j = 0 To 5
ImageHgq(j).Picture = LoadPicture(App.Path + "/icon/HGQ1.ico")
Next j
End If
End Sub
Private Sub ImageHgq_Click(Index As Integer)
If IfLocked Then Exit Sub
Dim ABC As Integer
Dim NL As Integer
Dim i As Integer
Dim Actstr As String
Dim Jxiang As String
Dim Index2 As String
On Error Resume Next
For i = 0 To Index
If ImageHgq(i).Tag > 0 Then NL = NL + ImageHgq(i).Tag - 1
Next i
Index2 = CStr(Index + 1)
If Len(Index2) = 1 Then Index2 = "0" & Index2
Jxiang = "000000000000000000000000000000000000000000000000000000000000"
Jxiang = NowJD.JCQXiang & Jxiang
Actstr = CStr(CInt((actline + 3) \ 3))
If actline < 99 Then
If ImageHgq(Index).Tag >= 1 Then
NL = NL + NowJD.zhilushu
Else
NL = Index
End If
ABC = actline Mod 3
Select Case ABC
Case 0
Actstr = Actstr & "A"
Lin(NL).BorderColor = &H8080&
Case 1
Actstr = Actstr & "B"
Lin(NL).BorderColor = &HFF0000
Case 2
Actstr = Actstr & "C"
Lin(NL).BorderColor = &HFF&
End Select
Lin(NL).Visible = True
Lin(NL).x1 = ImageJcq(actline).Left + ImageJcq(actline).Width / 2
Lin(NL).y1 = ImageJcq(actline).Top + ImageJcq(actline).Height
Lin(NL).x2 = ImageHgq(Index).Left + ImageHgq(Index).Width / 2
Lin(NL).y2 = ImageHgq(Index).Top '+ ImageHgq(Index).Height
ImageHgq(Index).Tag = ImageHgq(Index).Tag + 1
NowJD.JCQXiang = Left(Jxiang, NL * 4) & Index2 & Actstr & Mid(Jxiang, (NL + 1) * 4 + 1, 96 - NL * 4)
Else
i = InStr(Jxiang, Index2)
If i Mod 4 > 1 Then i = InStr(i + 1, Jxiang, Index2)
NL = (i + 3) \ 4 - 1
If ImageHgq(Index).Tag > 0 Then
ImageHgq(Index).Tag = ImageHgq(Index).Tag - 1
Lin(NL).Visible = False
NowJD.JCQXiang = Left(Jxiang, NL * 4) & "0000" & Mid(Jxiang, (NL + 1) * 4 + 1, 96 - NL * 4)
End If
End If
actline = 99
End Sub
Private Sub ImageHgq_DblClick(Index As Integer)
Lin(Index).Visible = False
End Sub
Private Sub ImageJcq_DblClick(Index As Integer)
If actline < 25 Then actline = Index
End Sub