| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 400 人关注过本帖
标题:[开源]为什么每次只能画一跟线.
只看楼主 加入收藏
knight1212
Rank: 1
等 级:新手上路
帖 子:76
专家分:0
注 册:2007-8-28
收藏
 问题点数:0 回复次数:0 
[开源]为什么每次只能画一跟线.

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

搜索更多相关主题的帖子: 开源 
2007-08-28 13:42
快速回复:[开源]为什么每次只能画一跟线.
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.015735 second(s), 7 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved