
B-75074EN/04 USER CUSTOMIZE 2.ADDING SCREENS
- 423 -
2.7.4 Event
Machine selection control: Event installation list
No Event Function
1 ChangeMcnNo Occurs when the machine number is changed.
2 ChangePathNo Occurs when the path number is changed.
3 ClickMcnNo Occurs when a machine title button is clicked.
4 ClickPathNo Occurs when a path title button is clicked.
2.7.5 Example of Usage
A sample program for changing the text character string of a machine
title button in accordance with the machine combo box display format
and displaying the machine number, path, name, and communication
protocol is provided below.
Dim scr As GefScreen
Dim obj As GefObject
Dim ole As GefObject
Dim pLocalPC As New Point
Dim pProjectPC As New Point
Dim LocalPC As String
Dim ProjectPC As String
Dim CurrentDir As String
Dim CurrentDirLen As Long
Dim CimFileName As String
Dim HostName As String
Dim McnNoInScr As Integer
Dim s As string
Set scr = CimGetScreen
Set obj = scr.Object.Objects.Item("McnSlct")
(*1)
Set ole = obj.OleObject
' Initialization
pLocalPC.ID = "$LOCAL.COMPUTER"
pProjectPC.ID = "$PROJECT.COMPUTER"
LocalPC = pLocalPC.GetValue
ProjectPC = pProjectPC.GetValue
If LocalPC = ProjectPC Then
s = Environ$("SITE_ROOT")
Else
CurrentDir = CurDir$()
If Right(CurrentDir, 1) <> "\" Then
CurrentDir = CurrentDir + "\"
End If
CurrentDirLen = Len(CurrentDir)
s = Left(CurrentDir, CurrentDirLen - 8) ' 8=screens\
End If
(*1) ”McnSlct” is the name
assigned to the
machine selection
control on the CimEdit
screen.