home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: 10 Tools
/
10-Tools.zip
/
pc3270sa.zip
/
vbdde
/
fgetoia.frm
< prev
next >
Wrap
Text File
|
2002-02-28
|
15KB
|
483 lines
VERSION 4.00
Begin VB.Form FormGetOIA
BorderStyle = 3 'Fixed Dialog
Caption = "Get Operator Indicator Area"
ClientHeight = 4560
ClientLeft = 1836
ClientTop = 2736
ClientWidth = 8856
BeginProperty Font
name = "MS Sans Serif"
charset = 0
weight = 700
size = 7.8
underline = 0 'False
italic = 0 'False
strikethrough = 0 'False
EndProperty
ForeColor = &H80000008&
Height = 4884
Left = 1788
LinkMode = 1 'Source
LinkTopic = "Form1"
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 4560
ScaleWidth = 8856
ShowInTaskbar = 0 'False
Top = 2460
Width = 8952
Begin VB.Frame Frame2
Caption = "Input Inhibited"
Height = 612
Left = 240
TabIndex = 8
Top = 1800
Width = 2892
Begin VB.Label InputInhibitLabel
Height = 252
Left = 96
TabIndex = 9
Top = 240
Width = 2700
End
End
Begin VB.Frame Frame1
Caption = "Online and Owership"
Height = 612
Left = 240
TabIndex = 6
Top = 1080
Width = 2892
Begin VB.Label OnlineLabel
Height = 252
Left = 96
TabIndex = 7
Top = 240
Width = 2556
End
End
Begin VB.ComboBox SessionIdList
BackColor = &H00FFFFC0&
ForeColor = &H00000000&
Height = 288
ItemData = "FGETOIA.frx":0000
Left = 1320
List = "FGETOIA.frx":0052
Sorted = -1 'True
Style = 2 'Dropdown List
TabIndex = 2
Top = 360
Width = 492
End
Begin VB.CommandButton ExitDlg
Cancel = -1 'True
Caption = "E&xit"
Height = 372
Left = 5400
TabIndex = 4
Top = 4080
Width = 852
End
Begin VB.CommandButton Execute
Caption = "&Execute"
Default = -1 'True
Height = 372
Left = 2640
TabIndex = 3
Top = 4080
Width = 876
End
Begin VB.Frame MWFrame
Caption = "MW"
Height = 612
Left = 6000
TabIndex = 25
Top = 1800
Width = 2604
Begin VB.Label MWLabel
Height = 252
Left = 96
TabIndex = 26
Top = 240
Width = 2412
End
End
Begin VB.Frame Frame8
Caption = "Insert mode"
Height = 612
Left = 6000
TabIndex = 21
Top = 2520
Width = 2652
Begin VB.Label InsertLabel
Height = 252
Left = 96
TabIndex = 22
Top = 240
Width = 1836
End
End
Begin VB.Frame Frame9
Caption = "Printer State"
Height = 612
Left = 3240
TabIndex = 23
Top = 1800
Width = 2604
Begin VB.Label PrinterLabel
Height = 252
Left = 96
TabIndex = 24
Top = 240
Width = 2220
End
End
Begin VB.Frame Frame3
Caption = "Communication error"
Height = 612
Left = 240
TabIndex = 10
Top = 2520
Width = 2892
Begin VB.Label CommErrLabel
Height = 252
Left = 120
TabIndex = 11
Top = 240
Width = 2676
End
End
Begin VB.Frame Frame7
Caption = "Color"
Height = 612
Left = 6000
TabIndex = 19
Top = 1080
Width = 2604
Begin VB.Label ColorLabel
Height = 252
Left = 96
TabIndex = 20
Top = 240
Width = 1836
End
End
Begin VB.Frame Frame5
Caption = "Shift State"
Height = 612
Left = 3240
TabIndex = 14
Top = 3240
Width = 2652
Begin VB.Label CAPSLabel
Height = 252
Left = 1320
TabIndex = 16
Top = 240
Width = 1236
End
Begin VB.Label ShiftLabel
Height = 252
Left = 96
TabIndex = 15
Top = 240
Width = 1236
End
End
Begin VB.Frame Frame6
Caption = "Highlight"
Height = 612
Left = 3240
TabIndex = 17
Top = 1080
Width = 2604
Begin VB.Label HightlightLabel
Height = 252
Left = 96
TabIndex = 18
Top = 240
Width = 2124
End
End
Begin VB.Frame Frame4
Caption = "Character Selection"
Height = 612
Left = 3240
TabIndex = 12
Top = 2520
Width = 2652
Begin VB.Label APLLabel
Height = 252
Left = 96
TabIndex = 13
Top = 240
Width = 1596
End
End
Begin VB.TextBox GetOIADataText
BackColor = &H00C0FFFF&
BeginProperty Font
name = "System"
charset = 0
weight = 700
size = 9.6
underline = 0 'False
italic = 0 'False
strikethrough = 0 'False
EndProperty
ForeColor = &H00FF0000&
Height = 360
Left = 2160
Locked = -1 'True
MaxLength = 80
MultiLine = -1 'True
TabIndex = 5
TabStop = 0 'False
Top = 360
Width = 6372
End
Begin VB.Frame Frame10
Caption = "Input Parameters"
Height = 612
Left = 120
TabIndex = 0
Top = 120
Width = 1812
Begin VB.Label Label1
Caption = "Session &Id"
Height = 252
Left = 120
TabIndex = 1
Top = 240
Width = 1092
End
End
Begin VB.Frame Frame11
Caption = "OIA Information"
Height = 3132
Left = 120
TabIndex = 27
Top = 840
Width = 8652
End
Begin VB.Frame Frame12
Caption = "OIA Data"
Height = 732
Left = 2040
TabIndex = 28
Top = 120
Width = 6612
End
End
Attribute VB_Name = "FormGetOIA"
Attribute VB_Creatable = False
Attribute VB_Exposed = False
Private Sub DisplayOIAState()
TempOIAData$ = RTrim$(Mid$(GetOIADataText.Text, 1, 7))
If TempOIAData$ = "ONLINE" Then
OnlineLabel.Caption = "Online and Not Owned"
ElseIf TempOIAData$ = "LU-LU" Then
OnlineLabel.Caption = "LU-LU Session"
ElseIf TempOIAData$ = "SSCP-LU" Then
OnlineLabel.Caption = "SSCP-LU Session"
End If
TempOIAData$ = RTrim$(Mid$(GetOIADataText.Text, 10, 8))
If TempOIAData$ = "X MCHK" Then
InputInhibitLabel.Caption = "Machine check"
ElseIf TempOIAData$ = "X CCHK" Then
InputInhibitLabel.Caption = "Communication check"
ElseIf TempOIAData$ = "X PCHK" Then
InputInhibitLabel.Caption = "Program check"
ElseIf TempOIAData$ = "X DNW" Then
InputInhibitLabel.Caption = "Device not working"
ElseIf TempOIAData$ = "X BUSY" Then
InputInhibitLabel.Caption = "Printing"
ElseIf TempOIAData$ = "X TWAIT" Then
InputInhibitLabel.Caption = "Terminal wait"
ElseIf TempOIAData$ = "X -S" Then
InputInhibitLabel.Caption = "Minus symbol"
ElseIf TempOIAData$ = "X -f" Then
InputInhibitLabel.Caption = "Minus funciton"
ElseIf TempOIAData$ = "X MUCH" Then
InputInhibitLabel.Caption = "Too much entered"
ElseIf TempOIAData$ = "X UA" Then
InputInhibitLabel.Caption = "Operator unauthorized"
ElseIf TempOIAData$ = "X -fUA" Then
InputInhibitLabel.Caption = "Operator unauthorized minus funciton"
ElseIf TempOIAData$ = "X DEAD" Then
InputInhibitLabel.Caption = "Invalid dead key combination"
ElseIf TempOIAData$ = "X WRONG" Then
InputInhibitLabel.Caption = "Wrong place"
ElseIf TempOIAData$ = "X SYSTEM" Then
InputInhibitLabel.Caption = "System wait"
ElseIf TempOIAData$ = "X II" Then
InputInhibitLabel.Caption = "Operator input error"
ElseIf TempOIAData$ = "X" Then
InputInhibitLabel.Caption = "Input inhibited"
End If
TempOIAData$ = Mid$(GetOIADataText.Text, 20, 4)
If TempOIAData$ = "COMM" Then
CommErrLabel.Caption = "Communication error"
End If
TempOIAData$ = Mid$(GetOIADataText.Text, 26, 2)
If TempOIAData$ = "MW" Then
MWLabel.Caption = "Message waiting"
End If
TempOIAData$ = Mid$(GetOIADataText.Text, 37, 3)
If TempOIAData$ = "APL" Then
APLLabel.Caption = "APL"
End If
TempOIAData$ = Mid$(GetOIADataText.Text, 43, 1)
If TempOIAData$ = "U" Then
ShiftLabel.Caption = "Upper shift"
ElseIf TempOIAData$ = "N" Then
ShiftLabel.Caption = "Numeric"
End If
TempOIAData$ = Mid$(GetOIADataText.Text, 44, 1)
If TempOIAData$ = "A" Then
CAPSLabel.Caption = "CAPS"
End If
TempOIAData$ = Mid$(GetOIADataText.Text, 48, 1)
If TempOIAData$ = "S" Then
HightlightLabel.Caption = "Operator selectable"
ElseIf TempOIAData$ = "I" Then
HightlightLabel.Caption = "Field inherit"
End If
TempOIAData$ = Mid$(GetOIADataText.Text, 50, 2)
If TempOIAData$ = "CS" Then
ColorLabel.Caption = "Operator selectable"
ElseIf TempOIAData$ = "CI" Then
ColorLabel.Caption = "Field inherit"
End If
TempOIAData$ = Mid$(GetOIADataText.Text, 53, 1)
If TempOIAData$ = "^" Then
InsertLabel.Caption = "Insert mode"
End If
TempOIAData$ = Mid$(GetOIADataText.Text, 62, 5)
If TempOIAData$ = "P-MAL" Then
PrinterLabel.Caption = "Printer makfunction"
ElseIf TempOIAData$ = "P-PRN" Then
PrinterLabel.Caption = "Printer printing"
ElseIf TempOIAData$ = "P-ASS" Then
PrinterLabel.Caption = "Printer assignment"
End If
End Sub
Private Sub Execute_Click()
On Error GoTo ErrHandler
FunctionComp = True
OldMousePointer = MousePointer
MousePointer = 11 ' Hour Glass Mouse Pointer
ClearOutput
If GetDisplayType$(SessionIdList.Text) = "NONE" Then
MousePointer = OldMousePointer
MsgBox MSG_INVALID_PSID + SessionIdList.Text, 48, MSG_SAMPLE_PROG
Exit Sub
End If
temp$ = LTrim$(RTrim$(SessionIdList.Text))
If Len(temp$) > 0 Then
Topic$ = "Session" + temp$
Else
MousePointer = OldMousePointer
MsgBox MSG_PARA_ERROR, 48, MSG_SAMPLE_PROG
Exit Sub
End If
Item$ = "OIA"
rc = DoEvents() 'If you use VisualBasic V2.0, call
'DoEvents function each time before
'starting DDE conversation.
GetOIADataText.LinkTimeout = -1
GetOIADataText.LinkTopic = APPLICATION_NAME + "|" + Topic$
GetOIADataText.LinkMode = COLD
GetOIADataText.LinkItem = Item$
GetOIADataText.LinkRequest
GetOIADataText.LinkMode = NONE
MousePointer = OldMousePointer
If FunctionComp = True Then
DisplayOIAState
MsgBox MSG_FUNCTION_COMP, 64, MSG_SAMPLE_PROG
EndStatus$ = MSG_OK
Else
MsgBox MSG_DDE_ERROR, 48, MSG_SAMPLE_PROG
EndStatus$ = MSG_NG
End If
TempLogData$ = Time$ + ":Get OIA : " + EndStatus$ + Chr$(13) + Chr$(10) + Chr$(9)
TempLogData$ = TempLogData$ + MSG_APPLICATION + """" + APPLICATION_NAME + """" + Chr$(13) + Chr$(10) + Chr$(9)
TempLogData$ = TempLogData$ + MSG_TOPIC + """" + Topic$ + """" + Chr$(13) + Chr$(10) + Chr$(9)
TempLogData$ = TempLogData$ + MSG_ITEM + """" + Item$ + """" + Chr$(13) + Chr$(10) + Chr$(9)
TempLogData$ = TempLogData$ + "Data =" + """" + GetOIADataText.Text + """" + Chr$(13) + Chr$(10)
LogData$(LogEnd) = TempLogData$
UpdateLogPointer
Loged = True
Exit Sub
ErrHandler:
FunctionComp = False
MsgBox Err.Number
Resume Next
End Sub
Private Sub ExitDlg_Click()
Hide
End Sub
Private Sub Form_Load()
SessionIdList.ListIndex = 0
If APPLICATION_NAME = "IBM3270" Then
MWFrame.Enabled = False
MWLabel.Enabled = False
End If
End Sub
Private Sub UpdateLogPointer()
LogEnd = LogEnd + 1
If LogEnd = MAXLOGNUM + 1 Then
LogEnd = 0
End If
If LogTop = LogEnd Then
LogTop = LogTop + 1
If LogTop = MAXLOGNUM + 1 Then
LogTop = 0
End If
End If
End Sub
Private Sub ClearOutput()
GetOIADataText.Text = ""
OnlineLabel.Caption = ""
InputInhibitLabel.Caption = ""
CommErrLabel.Caption = ""
MWLabel.Caption = ""
APLLabel.Caption = ""
ShiftLabel.Caption = ""
CAPSLabel.Caption = ""
HightlightLabel.Caption = ""
ColorLabel.Caption = ""
InsertLabel.Caption = ""
PrinterLabel.Caption = ""
End Sub