?? browser.frm
字號:
VERSION 5.00
Begin VB.Form Browser
BorderStyle = 3 'Fixed Dialog
Caption = "Tag Browser"
ClientHeight = 5628
ClientLeft = 2760
ClientTop = 3756
ClientWidth = 4680
LinkTopic = "Form1"
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 5628
ScaleWidth = 4680
ShowInTaskbar = 0 'False
Begin VB.CommandButton Find
Caption = "&Find now"
Height = 375
Left = 3240
TabIndex = 6
Top = 4920
Width = 1215
End
Begin VB.TextBox FILTER_PREFIX
Height = 288
Left = 240
TabIndex = 5
Text = "*"
Top = 4920
Width = 2055
End
Begin VB.TextBox FILTER_SUFFIX
Enabled = 0 'False
Height = 288
Left = 2280
TabIndex = 4
Text = "_TREND"
Top = 4920
Width = 855
End
Begin VB.ListBox TagList
Height = 3504
Left = 240
TabIndex = 3
Top = 720
Width = 2892
End
Begin VB.TextBox Tag_Item
Height = 288
Left = 240
TabIndex = 2
Top = 240
Width = 2895
End
Begin VB.CommandButton CancelButton
Caption = "Cancel"
Height = 375
Left = 3360
TabIndex = 1
Top = 720
Width = 1215
End
Begin VB.CommandButton OKButton
Caption = "OK"
Height = 375
Left = 3360
TabIndex = 0
Top = 240
Width = 1215
End
Begin VB.Frame Filter
Caption = "Filter"
Height = 852
Left = 120
TabIndex = 7
Top = 4560
Width = 4455
End
End
Attribute VB_Name = "Browser"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
'///////////////////////////////////////////////////////////////////////////
'
' OPC Trend VB Client: browser.frm
' (Source File)
'
'///////////////////////////////////////////////////////////////////////////
'
' Author: Raphael Imhof
' Initial Date: 11/04/98
' $Workfile: Browser.frm $
' $Revision: 1 $
' $Date: 7/27/99 5:13p $
' Target System: Microsoft Windows NT 4.0
' Environment: Visual Basic 6.0 / OPC DataAccess 2.0
' Remarks:
'
'///////////////////////////////////////////////////////////////////////////
'
' Description: implementation of the tag browser form
'
'
'///////////////////////////////////////////////////////////////////////////
'
' History of Changes (Please remove very old comments and blank lines!)
' $Log: /IDK/OPCServer/clients/VB/Trend/Browser.frm $
'
' 1 7/27/99 5:13p Imhof
'
' 1 7/27/99 4:37p Imhof
'
' 7 1/20/99 3:09p Imhof
' Header: updated log
'
' 5 1/15/99 10:43a Imhof
' Updated headers and corrected time stamp problem
'
'
' $Nokeywords:$ (To avoid useless search while checking in.)
'///////////////////////////////////////////////////////////////////////////
' Copyright (C) 1999, Siemens Building Technologies, Inc. Landis Division
'
' SIEMENS BUILDING TECHNOLOGIES, INC. IS PROVIDING THE FOLLOWING EXAMPLES
' OF CODE AS SAMPLE ONLY.
' SIEMENS BUILDING TECHNOLOGIES, INC. MAKES NO REPRESENTATIONS OR WARRANTIES
' OF ANY KIND WITH RESPECT TO THE VALIDTY OF THE CODES OR DESIRED RESULTS
' AND DISCLAIMS ALL SUCH REPRESENTATIONS AND WARRANTIES, INCLUDING FOR EXAMPLE,
' WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
' SIEMENS BUILIDNG TECHNOLOGIES, INC. DOES NOT REPRESENT OR WARRANT THAT
' THE FOLLOWING CODE SAMPLES ARE ACCURATE, VALID, COMPLETE OR CURRENT.
'
'///////////////////////////////////////////////////////////////////////////
Option Explicit
Public iButtonPressed As Integer
Public sTag As String
Private Sub CancelButton_Click()
iButtonPressed = -1
Unload Me
End Sub
Private Sub Find_Click()
On Error GoTo Error
MousePointer = vbHourglass
'remove all items
TagList.Clear
Tag_Item.Text = ""
Dim OPCBrowser As OPCBrowser
Set OPCBrowser = Trend.fMainForm.InfoSvr.CreateBrowser
OPCBrowser.Filter = FILTER_PREFIX.Text + FILTER_SUFFIX.Text
OPCBrowser.AccessRights = OPCReadable
OPCBrowser.ShowLeafs
Dim i As Long
For i = 1 To OPCBrowser.Count
TagList.AddItem OPCBrowser.Item(i)
Next i
MousePointer = vbDefault
Exit Sub
Error:
MousePointer = vbDefault
Trend.fMainForm.InfoSvr.GetErrorString (Err.Number)
End Sub
Private Sub Form_Load()
iButtonPressed = -1
'Find_Click
End Sub
Private Sub OKButton_Click()
sTag = Tag_Item
iButtonPressed = 1 'OK
Unload Me
End Sub
Private Sub TagList_Click()
Tag_Item = TagList.Text
End Sub
Private Sub TagList_DblClick()
Tag_Item = TagList.Text
OKButton_Click
End Sub
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -