home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / pc3270sa.zip / vbdde / fstoiaad.frm < prev    next >
Text File  |  2002-02-28  |  20KB  |  662 lines

  1. VERSION 4.00
  2. Begin VB.Form FormStartOIAAdvise 
  3.    BorderStyle     =   3  'Fixed Dialog
  4.    Caption         =   "Start Session Advise (OIA)"
  5.    ClientHeight    =   6744
  6.    ClientLeft      =   2004
  7.    ClientTop       =   1704
  8.    ClientWidth     =   8544
  9.    ControlBox      =   0   'False
  10.    BeginProperty Font 
  11.       name            =   "MS Sans Serif"
  12.       charset         =   0
  13.       weight          =   700
  14.       size            =   7.8
  15.       underline       =   0   'False
  16.       italic          =   0   'False
  17.       strikethrough   =   0   'False
  18.    EndProperty
  19.    ForeColor       =   &H80000008&
  20.    Height          =   7068
  21.    Left            =   1956
  22.    LinkMode        =   1  'Source
  23.    LinkTopic       =   "Form2"
  24.    MaxButton       =   0   'False
  25.    MinButton       =   0   'False
  26.    ScaleHeight     =   6744
  27.    ScaleWidth      =   8544
  28.    ShowInTaskbar   =   0   'False
  29.    Top             =   1428
  30.    Width           =   8640
  31.    Begin VB.Frame Frame10 
  32.       Caption         =   "OIA Data"
  33.       ForeColor       =   &H80000008&
  34.       Height          =   972
  35.       Left            =   120
  36.       TabIndex        =   31
  37.       Top             =   1800
  38.       Width           =   8172
  39.       Begin VB.TextBox OIADataText 
  40.          BackColor       =   &H00C0FFFF&
  41.          BeginProperty Font 
  42.             name            =   "System"
  43.             charset         =   0
  44.             weight          =   700
  45.             size            =   9.6
  46.             underline       =   0   'False
  47.             italic          =   0   'False
  48.             strikethrough   =   0   'False
  49.          EndProperty
  50.          ForeColor       =   &H00FF0000&
  51.          Height          =   612
  52.          Left            =   120
  53.          Locked          =   -1  'True
  54.          MaxLength       =   80
  55.          MultiLine       =   -1  'True
  56.          TabIndex        =   32
  57.          TabStop         =   0   'False
  58.          Top             =   240
  59.          Width           =   7932
  60.       End
  61.    End
  62.    Begin VB.Frame Frame9 
  63.       Caption         =   "Printer State"
  64.       ForeColor       =   &H80000008&
  65.       Height          =   615
  66.       Left            =   3360
  67.       TabIndex        =   24
  68.       Top             =   3840
  69.       Width           =   2415
  70.       Begin VB.Label PrinterLabel 
  71.          ForeColor       =   &H80000008&
  72.          Height          =   252
  73.          Left            =   96
  74.          TabIndex        =   25
  75.          Top             =   240
  76.          Width           =   2220
  77.       End
  78.    End
  79.    Begin VB.Frame MWFrame 
  80.       Caption         =   "MW"
  81.       ForeColor       =   &H80000008&
  82.       Height          =   615
  83.       Left            =   5880
  84.       TabIndex        =   29
  85.       Top             =   3840
  86.       Width           =   2415
  87.       Begin VB.Label MWLabel 
  88.          ForeColor       =   &H80000008&
  89.          Height          =   252
  90.          Left            =   120
  91.          TabIndex        =   30
  92.          Top             =   240
  93.          Width           =   1836
  94.       End
  95.    End
  96.    Begin VB.CommandButton ExitCommand 
  97.       Cancel          =   -1  'True
  98.       Caption         =   "E&xit"
  99.       Height          =   375
  100.       Left            =   5400
  101.       TabIndex        =   8
  102.       Top             =   6240
  103.       Width           =   855
  104.    End
  105.    Begin VB.CommandButton StopCommand 
  106.       Caption         =   "&End"
  107.       Enabled         =   0   'False
  108.       Height          =   375
  109.       Left            =   3840
  110.       TabIndex        =   7
  111.       Top             =   6240
  112.       Width           =   855
  113.    End
  114.    Begin VB.CommandButton StartCommand 
  115.       Caption         =   "&Begin"
  116.       Default         =   -1  'True
  117.       Height          =   375
  118.       Left            =   2280
  119.       TabIndex        =   6
  120.       Top             =   6240
  121.       Width           =   855
  122.    End
  123.    Begin VB.Frame Frame7 
  124.       Caption         =   "Color"
  125.       ForeColor       =   &H80000008&
  126.       Height          =   615
  127.       Left            =   5880
  128.       TabIndex        =   20
  129.       Top             =   3120
  130.       Width           =   2415
  131.       Begin VB.Label ColorLabel 
  132.          ForeColor       =   &H80000008&
  133.          Height          =   252
  134.          Left            =   96
  135.          TabIndex        =   21
  136.          Top             =   240
  137.          Width           =   1836
  138.       End
  139.    End
  140.    Begin VB.Frame Frame8 
  141.       Caption         =   "Insert mode"
  142.       ForeColor       =   &H80000008&
  143.       Height          =   615
  144.       Left            =   5880
  145.       TabIndex        =   26
  146.       Top             =   4560
  147.       Width           =   2415
  148.       Begin VB.Label InsertLabel 
  149.          ForeColor       =   &H80000008&
  150.          Height          =   252
  151.          Left            =   96
  152.          TabIndex        =   27
  153.          Top             =   240
  154.          Width           =   1836
  155.       End
  156.    End
  157.    Begin VB.Frame Frame2 
  158.       Caption         =   "Input Inhibited"
  159.       ForeColor       =   &H80000008&
  160.       Height          =   615
  161.       Left            =   240
  162.       TabIndex        =   15
  163.       Top             =   3840
  164.       Width           =   3015
  165.       Begin VB.Label InputInhibitLabel 
  166.          ForeColor       =   &H80000008&
  167.          Height          =   252
  168.          Left            =   96
  169.          TabIndex        =   16
  170.          Top             =   240
  171.          Width           =   2700
  172.       End
  173.    End
  174.    Begin VB.Frame Frame6 
  175.       Caption         =   "Highlight"
  176.       ForeColor       =   &H80000008&
  177.       Height          =   615
  178.       Left            =   3360
  179.       TabIndex        =   13
  180.       Top             =   3120
  181.       Width           =   2415
  182.       Begin VB.Label HightlightLabel 
  183.          ForeColor       =   &H80000008&
  184.          Height          =   252
  185.          Left            =   96
  186.          TabIndex        =   14
  187.          Top             =   240
  188.          Width           =   2124
  189.       End
  190.    End
  191.    Begin VB.Frame Frame4 
  192.       Caption         =   "Character Selection"
  193.       ForeColor       =   &H80000008&
  194.       Height          =   615
  195.       Left            =   3360
  196.       TabIndex        =   11
  197.       Top             =   4560
  198.       Width           =   2415
  199.       Begin VB.Label APLLabel 
  200.          ForeColor       =   &H80000008&
  201.          Height          =   252
  202.          Left            =   192
  203.          TabIndex        =   12
  204.          Top             =   240
  205.          Width           =   492
  206.       End
  207.    End
  208.    Begin VB.Frame Frame1 
  209.       Caption         =   "Online and Owership"
  210.       ForeColor       =   &H80000008&
  211.       Height          =   615
  212.       Left            =   240
  213.       TabIndex        =   9
  214.       Top             =   3120
  215.       Width           =   3015
  216.       Begin VB.Label OnlineLabel 
  217.          ForeColor       =   &H80000008&
  218.          Height          =   252
  219.          Left            =   96
  220.          TabIndex        =   10
  221.          Top             =   240
  222.          Width           =   2124
  223.       End
  224.    End
  225.    Begin VB.Frame Frame5 
  226.       Caption         =   "Shft State"
  227.       ForeColor       =   &H80000008&
  228.       Height          =   615
  229.       Left            =   3360
  230.       TabIndex        =   17
  231.       Top             =   5280
  232.       Width           =   2415
  233.       Begin VB.Label CAPSLabel 
  234.          ForeColor       =   &H80000008&
  235.          Height          =   252
  236.          Left            =   1152
  237.          TabIndex        =   19
  238.          Top             =   240
  239.          Width           =   1068
  240.       End
  241.       Begin VB.Label ShiftLabel 
  242.          ForeColor       =   &H80000008&
  243.          Height          =   252
  244.          Left            =   96
  245.          TabIndex        =   18
  246.          Top             =   240
  247.          Width           =   1068
  248.       End
  249.    End
  250.    Begin VB.Frame Frame3 
  251.       Caption         =   "Communication error"
  252.       ForeColor       =   &H80000008&
  253.       Height          =   612
  254.       Left            =   240
  255.       TabIndex        =   22
  256.       Top             =   4560
  257.       Width           =   3012
  258.       Begin VB.Label CommErrLabel 
  259.          ForeColor       =   &H80000008&
  260.          Height          =   255
  261.          Left            =   120
  262.          TabIndex        =   23
  263.          Top             =   240
  264.          Width           =   1830
  265.       End
  266.    End
  267.    Begin VB.Frame UserDefFrame 
  268.       Caption         =   "User Defined &String"
  269.       Enabled         =   0   'False
  270.       ForeColor       =   &H80000008&
  271.       Height          =   612
  272.       Left            =   2040
  273.       TabIndex        =   4
  274.       Top             =   720
  275.       Width           =   2772
  276.       Begin VB.TextBox UserDefStrText 
  277.          BackColor       =   &H00FFFFC0&
  278.          Enabled         =   0   'False
  279.          ForeColor       =   &H00000000&
  280.          Height          =   288
  281.          Left            =   120
  282.          TabIndex        =   5
  283.          Text            =   "example"
  284.          Top             =   240
  285.          Width           =   2532
  286.       End
  287.    End
  288.    Begin VB.CheckBox TopicCheck 
  289.       Caption         =   "&Use Session Topic Name "
  290.       ForeColor       =   &H80000008&
  291.       Height          =   372
  292.       Left            =   2040
  293.       TabIndex        =   3
  294.       Top             =   360
  295.       Value           =   1  'Checked
  296.       Width           =   2412
  297.    End
  298.    Begin VB.Frame Frame11 
  299.       Caption         =   "Input Parameters"
  300.       Height          =   1332
  301.       Left            =   120
  302.       TabIndex        =   0
  303.       Top             =   120
  304.       Width           =   8172
  305.       Begin VB.ComboBox SessionIdList 
  306.          BackColor       =   &H00FFFFC0&
  307.          ForeColor       =   &H00000000&
  308.          Height          =   288
  309.          ItemData        =   "FSTOIAAD.frx":0000
  310.          Left            =   1080
  311.          List            =   "FSTOIAAD.frx":0052
  312.          Sorted          =   -1  'True
  313.          Style           =   2  'Dropdown List
  314.          TabIndex        =   2
  315.          Top             =   360
  316.          Width           =   492
  317.       End
  318.       Begin VB.Frame Frame13 
  319.          Caption         =   "Topic"
  320.          Height          =   612
  321.          Left            =   4800
  322.          TabIndex        =   34
  323.          Top             =   600
  324.          Width           =   3252
  325.          Begin VB.Label TopicLabel 
  326.             Alignment       =   2  'Center
  327.             Caption         =   "SessionA"
  328.             Height          =   252
  329.             Left            =   120
  330.             TabIndex        =   35
  331.             Top             =   240
  332.             Width           =   3012
  333.          End
  334.       End
  335.       Begin VB.Label Label1 
  336.          Caption         =   "Session &Id"
  337.          Height          =   252
  338.          Left            =   120
  339.          TabIndex        =   1
  340.          Top             =   360
  341.          Width           =   972
  342.       End
  343.    End
  344.    Begin VB.Frame Frame12 
  345.       Caption         =   "OIA Information"
  346.       Height          =   3252
  347.       Left            =   120
  348.       TabIndex        =   33
  349.       Top             =   2880
  350.       Width           =   8292
  351.    End
  352.    Begin VB.Label ResultMessageLabel 
  353.       Alignment       =   2  'Center
  354.       Caption         =   "DDE Conversation Started"
  355.       ForeColor       =   &H00FF0000&
  356.       Height          =   252
  357.       Left            =   120
  358.       TabIndex        =   28
  359.       Top             =   1560
  360.       Visible         =   0   'False
  361.       Width           =   8172
  362.    End
  363. End
  364. Attribute VB_Name = "FormStartOIAAdvise"
  365. Attribute VB_Creatable = False
  366. Attribute VB_Exposed = False
  367. Private Sub ExitCommand_Click()
  368.    Unload FormStartOIAAdvise
  369. End Sub
  370.  
  371. Private Sub Form_Load()
  372.   SessionIdList.ListIndex = 0
  373.     
  374.     If APPLICATION_NAME = "IBM3270" Then
  375.        MWFrame.Enabled = False
  376.        MWLabel.Enabled = False
  377.     End If
  378. End Sub
  379.  
  380. Private Function GetTopicName() As String
  381.  
  382.    If Len(SessionIdList.Text) > 0 Then
  383.       If TopicCheck.Value = CHECKED Then
  384.          ReturnString$ = "Session" + SessionIdList.Text
  385.       Else
  386.          ReturnString$ = "Sess" + SessionIdList.Text + "_" + UserDefStrText.Text
  387.       End If
  388.       GetTopicName = ReturnString$
  389.    Else
  390.       MsgBox MSG_PARA_ERROR, 48, MSG_SAMPLE_PROG
  391.    End If
  392. End Function
  393.  
  394. Private Sub OIADataText_Change()
  395.    If StartCommand.Enabled = False Then
  396.       ShowOIAGroup
  397.       LogData$(LogEnd) = Time$ + ":OIA was updated :" + Chr$(13) + Chr$(10) + Chr$(9) + "Data=" + OIADataText.Text + Chr$(13) + Chr$(10)
  398.       UpdateLogPointer
  399.       UpdateLog
  400.    End If
  401. End Sub
  402.  
  403. Private Sub ShowOIAGroup()
  404.  
  405.    temp$ = RTrim$(Mid$(OIADataText.Text, 1, 7))
  406.    If temp$ = "ONLINE" Then
  407.       OnlineLabel.Caption = "Online and Not Owned"
  408.    ElseIf temp$ = "LU-LU" Then
  409.       OnlineLabel.Caption = "LU-LU Session"
  410.    ElseIf temp$ = "SSCP-LU" Then
  411.       OnlineLabel.Caption = "SSCP-LU Session"
  412.    Else
  413.       OnlineLabel.Caption = " "
  414.    End If
  415.    
  416.    temp$ = RTrim$(Mid$(OIADataText.Text, 10, 8))
  417.    If temp$ = "X MCHK" Then
  418.       InputInhibitLabel.Caption = "Machine check"
  419.    ElseIf temp$ = "X CCHK" Then
  420.       InputInhibitLabel.Caption = "Communication check"
  421.    ElseIf temp$ = "X PCHK" Then
  422.       InputInhibitLabel.Caption = "Program check"
  423.    ElseIf temp$ = "X DNW" Then
  424.       InputInhibitLabel.Caption = "Device not working"
  425.    ElseIf temp$ = "X BUSY" Then
  426.       InputInhibitLabel.Caption = "Printing"
  427.    ElseIf temp$ = "X TWAIT" Then
  428.       InputInhibitLabel.Caption = "Terminal wait"
  429.    ElseIf temp$ = "X -S" Then
  430.       InputInhibitLabel.Caption = "Minus symbol"
  431.    ElseIf temp$ = "X -f" Then
  432.       InputInhibitLabel.Caption = "Minus funciton"
  433.    ElseIf temp$ = "X MUCH" Then
  434.       InputInhibitLabel.Caption = "Too much entered"
  435.    ElseIf temp$ = "X UA" Then
  436.       InputInhibitLabel.Caption = "Operator unauthorized"
  437.    ElseIf temp$ = "X -fUA" Then
  438.       InputInhibitLabel.Caption = "Operator unauthorized minus funciton"
  439.    ElseIf temp$ = "X DEAD" Then
  440.       InputInhibitLabel.Caption = "Invalid dead key combination"
  441.    ElseIf temp$ = "X WRONG" Then
  442.       InputInhibitLabel.Caption = "Wrong place"
  443.    ElseIf temp$ = "X SYSTEM" Then
  444.       InputInhibitLabel.Caption = "System wait"
  445.    ElseIf temp$ = "X II" Then
  446.       InputInhibitLabel.Caption = "Operater input error"
  447.    ElseIf temp$ = "X" Then
  448.       InputInhibitLabel.Caption = "Input inhibited"
  449.    Else
  450.       InputInhibitLabel.Caption = " "
  451.    End If
  452.  
  453.    temp$ = Mid$(OIADataText.Text, 20, 4)
  454.    If temp$ = "COMM" Then
  455.       CommErrLabel.Caption = "Communication error"
  456.    Else
  457.       CommErrLabel.Caption = " "
  458.    End If
  459.  
  460.    temp$ = Mid$(OIADataText.Text, 26, 2)
  461.    If temp$ = "MW" Then
  462.       MWLabel.Caption = "Message waiting"
  463.    Else
  464.       MWLabel.Caption = " "
  465.    End If
  466.  
  467.    temp$ = Mid$(OIADataText.Text, 37, 3)
  468.    If temp$ = "APL" Then
  469.       APLLabel.Caption = "APL"
  470.    Else
  471.       APLLabel.Caption = " "
  472.    End If
  473.  
  474.    temp$ = Mid$(OIADataText.Text, 43, 1)
  475.    If temp$ = "U" Then
  476.       ShiftLabel.Caption = "Upper shift"
  477.    ElseIf temp$ = "N" Then
  478.       ShiftLabel.Caption = "Numeric"
  479.    Else
  480.       ShiftLabel.Caption = " "
  481.    End If
  482.  
  483.    temp$ = Mid$(OIADataText.Text, 44, 1)
  484.    If temp$ = "A" Then
  485.       CAPSLabel.Caption = "CAPS"
  486.    Else
  487.       CAPSLabel.Caption = " "
  488.    End If
  489.  
  490.    temp$ = Mid$(OIADataText.Text, 48, 1)
  491.    If temp$ = "S" Then
  492.       HightlightLabel.Caption = "Operator selectable"
  493.    ElseIf temp$ = "I" Then
  494.       HightlightLabel.Caption = "Field inherit"
  495.    Else
  496.       HightlightLabel.Caption = " "
  497.    End If
  498.  
  499.    temp$ = Mid$(OIADataText.Text, 50, 2)
  500.    If temp$ = "CS" Then
  501.       ColorLabel.Caption = "Operator selectable"
  502.    ElseIf temp$ = "CI" Then
  503.       ColorLabel.Caption = "Field inherit"
  504.    Else
  505.       ColorLabel.Caption = " "
  506.    End If
  507.  
  508.    temp$ = Mid$(OIADataText.Text, 53, 1)
  509.    If temp$ = "^" Then
  510.       InsertLabel.Caption = "Insert mode"
  511.    Else
  512.       InsertLabel.Caption = " "
  513.    End If
  514.  
  515.    temp$ = Mid$(OIADataText.Text, 62, 5)
  516.    If temp$ = "P-MAL" Then
  517.       PrinterLabel.Caption = "Printer makfunction"
  518.    ElseIf temp$ = "P-PRN" Then
  519.       PrinterLabel.Caption = "Printer printing"
  520.    ElseIf temp$ = "P-ASS" Then
  521.       PrinterLabel.Caption = "Printer assignment"
  522.    Else
  523.       PrinterLabel.Caption = " "
  524.    End If
  525.  
  526. End Sub
  527.  
  528. Private Sub StartCommand_Click()
  529. On Error GoTo ErrHandler
  530.    FunctionComp = True
  531.    
  532.    OldMousePointer = MousePointer
  533.    MousePointer = 11 ' Hour Glass Mouse Pointer
  534.    
  535.    DisplayType$ = GetDisplayType$(SessionIdList.Text)
  536.    
  537.    If DisplayType$ = "NONE" Then
  538.       MousePointer = OldMousePointer
  539.       MsgBox MSG_INVALID_PSID + SessionIdList.Text, 48, MSG_SAMPLE_PROG
  540.       Exit Sub
  541.    End If
  542.    
  543.    Topic$ = GetTopicName()
  544.    If Len(Topic$) <= 0 Then
  545.      MsgBox MSG_PARA_ERROR, 48, MSG_SAMPLE_PROG
  546.      MousePointer = OldMousePointer
  547.      Exit Sub
  548.    End If
  549.       
  550.       Item$ = "OIA"
  551.       rc = DoEvents()           'If you use VisualBasic V2.0, call
  552.                                 'DoEvents function each time before
  553.                                 'starting DDE conversation.
  554.       OIADataText.LinkTimeout = -1
  555.       OIADataText.LinkTopic = APPLICATION_NAME + "|" + Topic$
  556.       OIADataText.LinkItem = Item$
  557.       OIADataText.LinkMode = HOT
  558.       
  559.       MousePointer = OldMousePointer
  560.       If FunctionComp = True Then
  561.          ResultMessageLabel.Visible = True
  562.          EndStatus$ = MSG_OK
  563.          StartCommand.Enabled = False
  564.          StopCommand.Enabled = True
  565.          ExitCommand.Enabled = False
  566.       Else
  567.          ResultMessageLabel.Visible = False
  568.          MsgBox MSG_DDE_ERROR, 48, MSG_SAMPLE_PROG
  569.          EndStatus$ = MSG_NG
  570.       End If
  571.       TempLogData$ = Time$ + ":Start Session Advise (OIA) : " + EndStatus$ + Chr$(13) + Chr$(10) + Chr$(9)
  572.       TempLogData$ = TempLogData$ + MSG_APPLICATION + APPLICATION_NAME + """""" + Chr$(13) + Chr$(10) + Chr$(9)
  573.       TempLogData$ = TempLogData$ + MSG_TOPIC + """" + Topic$ + """" + Chr$(13) + Chr$(10) + Chr$(9)
  574.       TempLogData$ = TempLogData$ + MSG_ITEM + """" + Item$ + """" + Chr$(13) + Chr$(10)
  575.       LogData$(LogEnd) = TempLogData$
  576.       UpdateLogPointer
  577.       UpdateLog
  578.    Exit Sub
  579.  
  580. ErrHandler:
  581.    FunctionComp = False
  582.    Resume Next
  583. End Sub
  584.  
  585. Private Sub StopCommand_Click()
  586. On Error GoTo StopErrHandler
  587.    FunctionComp = True
  588.    
  589.    OIADataText.LinkTimeout = -1
  590.    OIADataText.LinkMode = NONE
  591.    If FunctionComp = True Then
  592.       ResultMessageLabel.Visible = False
  593.       EndStatus$ = MSG_OK
  594.       StopCommand.Enabled = False
  595.       StartCommand.Enabled = True
  596.       ExitCommand.Enabled = True
  597.    Else
  598.       MsgBox MSG_DDE_ERROR, 48, MSG_SAMPLE_PROG
  599.       EndStatus$ = MSG_NG
  600.    End If
  601.    LogData$(LogEnd) = Time$ + ":Stop Session Advise (OIA) : " + EndStatus$ + Chr$(13) + Chr$(10)
  602.    UpdateLogPointer
  603.    UpdateLog
  604.    Exit Sub
  605.  
  606. StopErrHandler:
  607.    FunctionComp = False
  608.    Resume Next
  609. End Sub
  610.  
  611. Private Sub TopicCheck_Click()
  612.   If TopicCheck.Value = CHECKED Then
  613.      UserDefFrame.Enabled = False
  614.      UserDefStrText.Enabled = False
  615.   Else
  616.      UserDefFrame.Enabled = True
  617.      UserDefStrText.Enabled = True
  618.   End If
  619.   
  620.   TopicLabel.Caption = GetTopicName()
  621. End Sub
  622.  
  623. Private Sub UpdateLog()
  624.     temp$ = " "
  625.     If LogTop > LogEnd Then
  626.        For i% = LogTop To MAXLOGNUM
  627.           temp$ = temp$ + LogData$(i%)
  628.        Next
  629.        For i% = 0 To LogEnd
  630.           temp$ = temp$ + LogData$(i%)
  631.        Next
  632.     ElseIf LogTop < LogEnd Then
  633.        For i% = LogTop To LogEnd
  634.           temp$ = temp$ + LogData(i%)
  635.        Next
  636.     Else
  637.        temp$ = LogData(i%)
  638.     End If
  639.     MainForm.FunctionLog.Text = temp$
  640.     Loged = False
  641. End Sub
  642.  
  643. Private Sub UpdateLogPointer()
  644.     LogEnd = LogEnd + 1
  645.     If LogEnd = MAXLOGNUM + 1 Then
  646.        LogEnd = 0
  647.     End If
  648.  
  649.     If LogTop = LogEnd Then
  650.        LogTop = LogTop + 1
  651.        If LogTop = MAXLOGNUM + 1 Then
  652.           LogTop = 0
  653.        End If
  654.     End If
  655. End Sub
  656.  
  657. Private Sub UserDefStrText_Change()
  658.   TopicLabel.Caption = GetTopicName()
  659. End Sub
  660.  
  661.  
  662.