www.pudn.com > kelon.rar > fControl.frm


VERSION 5.00
Begin VB.Form fControl
Caption = "数据采集显示器 V1.0"
ClientHeight = 585
ClientLeft = 60
ClientTop = 345
ClientWidth = 7050
Icon = "fControl.frx":0000
LinkTopic = "Form1"
ScaleHeight = 585
ScaleWidth = 7050
Begin VB.PictureBox Picture1
Appearance = 0 'Flat
BackColor = &amt;H80000005&amt;
ForeColor = &amt;H80000008&amt;
Height = 525
Index = 0
Left = 45
ScaleHeight = 495
ScaleWidth = 555
TabIndex = 0
Top = 30
Width = 585
End
End
Attribute VB_Name = "fControl"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
'位置: 12
Private Sub Form_DblClick()
Unload Me
End Sub

Private Sub Form_Load()
If App.PrevInstance Then
If App.Title = Me.Caption Then
' MsgBox ("注意:程序已经运行,不能再次装载。"), vbExclamation
End
End If
End If
Call GetIniFileName
Dim I As Long, c As Long
Dim ls As String, func As String, tool As String
On Error GoTo err
c = mod01.pGetString(iniFn, "local", "picCount00")
For I = 0 To c - 1
If I <> 0 Then
Load Picture1(I)
Picture1(I).Left = Picture1(I - 1).Left + Picture1(I - 1).Width + 15
Picture1(I).Visible = True
End If
ls = mod01.pGetString(iniFn, "local", "pic" + Format(I, "00"))
Picture1(I).Picture = LoadPicture(App.Path + ls)
func = mod01.pGetString(iniFn, "local", "picFunc" + Format(I, "00"))
Picture1(I).Tag = func
tool = mod01.pGetString(iniFn, "local", "functool" + Format(I, "00"))
Picture1(I).ToolTipText = tool
Next
On Error GoTo 0
err:
Call SetobjLoc(Me, 12)
End Sub

Private Sub Form_Unload(Cancel As Integer)
SaveobjLoc Me, 12
End Sub

Private Sub Picture1_Click(Index As Integer)
If InStr(Picture1(Index).Tag, ".") > 0 Then
Select Case Picture1(Index).Tag
Case "KL_Show.exe 1"
fShow.Show
Case "KL_Show.exe 2"
fInput.Show
' Case "pComPort.exe"
' fControl.Show
Case Else
Shell App.Path + "\" + Picture1(Index).Tag + " 0," + UID + ",wyzshxl", vbNormalFocus
End Select
Else
Unload Me
End If
End Sub