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

  1. VERSION 4.00
  2. Begin VB.Form FormStartMouseIntercept 
  3.    BorderStyle     =   3  'Fixed Dialog
  4.    Caption         =   "Start Mouse Intercept"
  5.    ClientHeight    =   6852
  6.    ClientLeft      =   2736
  7.    ClientTop       =   1332
  8.    ClientWidth     =   6744
  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          =   7176
  21.    Left            =   2688
  22.    LinkTopic       =   "Form1"
  23.    MaxButton       =   0   'False
  24.    MinButton       =   0   'False
  25.    ScaleHeight     =   6852
  26.    ScaleWidth      =   6744
  27.    ShowInTaskbar   =   0   'False
  28.    Top             =   1056
  29.    Visible         =   0   'False
  30.    Width           =   6840
  31.    Begin VB.TextBox InterceptConditionText 
  32.       BackColor       =   &H00C0FFFF&
  33.       BeginProperty Font 
  34.          name            =   "System"
  35.          charset         =   0
  36.          weight          =   700
  37.          size            =   9.6
  38.          underline       =   0   'False
  39.          italic          =   0   'False
  40.          strikethrough   =   0   'False
  41.       EndProperty
  42.       Height          =   372
  43.       Left            =   3960
  44.       ScrollBars      =   2  'Vertical
  45.       TabIndex        =   11
  46.       TabStop         =   0   'False
  47.       Top             =   6360
  48.       Visible         =   0   'False
  49.       Width           =   372
  50.    End
  51.    Begin VB.Frame Frame3 
  52.       Caption         =   "Intercepted Mouse &Input"
  53.       Height          =   3372
  54.       Left            =   120
  55.       TabIndex        =   5
  56.       Top             =   2880
  57.       Width           =   6492
  58.       Begin VB.Frame Frame13 
  59.          Caption         =   "Time Of Intercept"
  60.          Height          =   612
  61.          Left            =   4440
  62.          TabIndex        =   40
  63.          Top             =   1680
  64.          Width           =   1932
  65.          Begin VB.Label TimeLabel 
  66.             Height          =   252
  67.             Left            =   120
  68.             TabIndex        =   41
  69.             Top             =   240
  70.             Width           =   1692
  71.          End
  72.       End
  73.       Begin VB.Frame RetrievedFrame 
  74.          Caption         =   "Retrieved String"
  75.          Height          =   852
  76.          Left            =   120
  77.          TabIndex        =   30
  78.          Top             =   2400
  79.          Width           =   6012
  80.          Begin VB.TextBox RetrievedText 
  81.             BackColor       =   &H00C0FFFF&
  82.             Height          =   492
  83.             Left            =   120
  84.             Locked          =   -1  'True
  85.             MultiLine       =   -1  'True
  86.             ScrollBars      =   1  'Horizontal
  87.             TabIndex        =   39
  88.             Top             =   240
  89.             Width           =   5772
  90.          End
  91.       End
  92.       Begin VB.Frame Frame12 
  93.          Caption         =   "Type of Click"
  94.          Height          =   612
  95.          Left            =   2280
  96.          TabIndex        =   28
  97.          Top             =   1680
  98.          Width           =   1932
  99.          Begin VB.Label TypeOfClickLabel 
  100.             Height          =   252
  101.             Left            =   120
  102.             TabIndex        =   29
  103.             Top             =   240
  104.             Width           =   1692
  105.          End
  106.       End
  107.       Begin VB.Frame Frame11 
  108.          Caption         =   "Which Button"
  109.          Height          =   612
  110.          Left            =   120
  111.          TabIndex        =   26
  112.          Top             =   1680
  113.          Width           =   1932
  114.          Begin VB.Label WhichButtonLabel 
  115.             Height          =   252
  116.             Left            =   120
  117.             TabIndex        =   27
  118.             Top             =   240
  119.             Width           =   1692
  120.          End
  121.       End
  122.       Begin VB.Frame Frame10 
  123.          Caption         =   "Number of Columns"
  124.          Height          =   612
  125.          Left            =   4440
  126.          TabIndex        =   24
  127.          Top             =   960
  128.          Width           =   1932
  129.          Begin VB.Label NumberOfColumnsLabel 
  130.             Height          =   252
  131.             Left            =   120
  132.             TabIndex        =   25
  133.             Top             =   240
  134.             Width           =   1692
  135.          End
  136.       End
  137.       Begin VB.Frame Frame9 
  138.          Caption         =   "Number of Rows"
  139.          Height          =   612
  140.          Left            =   2280
  141.          TabIndex        =   22
  142.          Top             =   960
  143.          Width           =   1932
  144.          Begin VB.Label NumberOfRowsLabel 
  145.             Height          =   252
  146.             Left            =   120
  147.             TabIndex        =   23
  148.             Top             =   240
  149.             Width           =   1692
  150.          End
  151.       End
  152.       Begin VB.Frame Frame8 
  153.          Caption         =   "Size of PS"
  154.          Height          =   612
  155.          Left            =   120
  156.          TabIndex        =   17
  157.          Top             =   960
  158.          Width           =   1932
  159.          Begin VB.Label SizeOfPSLabel 
  160.             Height          =   252
  161.             Left            =   120
  162.             TabIndex        =   21
  163.             Top             =   240
  164.             Width           =   1692
  165.          End
  166.       End
  167.       Begin VB.Frame Frame7 
  168.          Caption         =   "Column"
  169.          Height          =   612
  170.          Left            =   4440
  171.          TabIndex        =   16
  172.          Top             =   240
  173.          Width           =   1932
  174.          Begin VB.Label ColumnLabel 
  175.             Height          =   252
  176.             Left            =   120
  177.             TabIndex        =   20
  178.             Top             =   240
  179.             Width           =   1692
  180.          End
  181.       End
  182.       Begin VB.Frame Frame6 
  183.          Caption         =   "Row"
  184.          Height          =   612
  185.          Left            =   2280
  186.          TabIndex        =   15
  187.          Top             =   240
  188.          Width           =   1932
  189.          Begin VB.Label RowLabel 
  190.             Height          =   252
  191.             Left            =   120
  192.             TabIndex        =   19
  193.             Top             =   240
  194.             Width           =   1692
  195.          End
  196.       End
  197.       Begin VB.Frame Frame5 
  198.          Caption         =   "PS Offset"
  199.          Height          =   612
  200.          Left            =   120
  201.          TabIndex        =   14
  202.          Top             =   240
  203.          Width           =   1932
  204.          Begin VB.Label PSOffsetLabel 
  205.             Height          =   252
  206.             Left            =   120
  207.             TabIndex        =   18
  208.             Top             =   240
  209.             Width           =   1692
  210.          End
  211.       End
  212.    End
  213.    Begin VB.ComboBox SessionIdList 
  214.       BackColor       =   &H00FFFFC0&
  215.       ForeColor       =   &H00000000&
  216.       Height          =   288
  217.       ItemData        =   "FSTMOUSE.frx":0000
  218.       Left            =   1200
  219.       List            =   "FSTMOUSE.frx":0052
  220.       Sorted          =   -1  'True
  221.       Style           =   2  'Dropdown List
  222.       TabIndex        =   2
  223.       Top             =   360
  224.       Width           =   492
  225.    End
  226.    Begin VB.Frame UserDefFrame 
  227.       Caption         =   "&User Defined String"
  228.       Enabled         =   0   'False
  229.       Height          =   612
  230.       Left            =   240
  231.       TabIndex        =   4
  232.       Top             =   1800
  233.       Width           =   2532
  234.       Begin VB.TextBox UserDefStrText 
  235.          BackColor       =   &H00FFFFC0&
  236.          Enabled         =   0   'False
  237.          ForeColor       =   &H00000000&
  238.          Height          =   288
  239.          Left            =   120
  240.          TabIndex        =   31
  241.          Text            =   "example"
  242.          Top             =   240
  243.          Width           =   2292
  244.       End
  245.    End
  246.    Begin VB.TextBox MouseInputText 
  247.       BackColor       =   &H00C0FFFF&
  248.       BeginProperty Font 
  249.          name            =   "System"
  250.          charset         =   0
  251.          weight          =   700
  252.          size            =   9.6
  253.          underline       =   0   'False
  254.          italic          =   0   'False
  255.          strikethrough   =   0   'False
  256.       EndProperty
  257.       Height          =   372
  258.       Left            =   2160
  259.       ScrollBars      =   2  'Vertical
  260.       TabIndex        =   10
  261.       TabStop         =   0   'False
  262.       Top             =   6360
  263.       Visible         =   0   'False
  264.       Width           =   372
  265.    End
  266.    Begin VB.CommandButton ExitCommand 
  267.       Cancel          =   -1  'True
  268.       Caption         =   "E&xit"
  269.       Height          =   372
  270.       Left            =   4920
  271.       TabIndex        =   8
  272.       Top             =   6360
  273.       Width           =   732
  274.    End
  275.    Begin VB.CommandButton StopCommand 
  276.       Caption         =   "&End"
  277.       Enabled         =   0   'False
  278.       Height          =   372
  279.       Left            =   2880
  280.       TabIndex        =   7
  281.       Top             =   6360
  282.       Width           =   732
  283.    End
  284.    Begin VB.CommandButton StartCommand 
  285.       Caption         =   "&Begin"
  286.       Default         =   -1  'True
  287.       Height          =   372
  288.       Left            =   840
  289.       TabIndex        =   6
  290.       Top             =   6360
  291.       Width           =   732
  292.    End
  293.    Begin VB.CheckBox TopicCheck 
  294.       Caption         =   "Use Session Topic &Name "
  295.       Height          =   372
  296.       Left            =   240
  297.       TabIndex        =   3
  298.       Top             =   720
  299.       Value           =   1  'Checked
  300.       Width           =   2532
  301.    End
  302.    Begin VB.Frame Frame2 
  303.       Caption         =   "Input Parameters"
  304.       Height          =   2412
  305.       Left            =   120
  306.       TabIndex        =   0
  307.       Top             =   120
  308.       Width           =   6492
  309.       Begin VB.Frame Frame1 
  310.          Caption         =   "Intercept &Conditions"
  311.          Height          =   2052
  312.          Left            =   2880
  313.          TabIndex        =   32
  314.          Top             =   240
  315.          Width           =   3492
  316.          Begin VB.CheckBox ChkRetString 
  317.             Caption         =   "Retrieve &Pointed String"
  318.             Height          =   252
  319.             Left            =   120
  320.             TabIndex        =   38
  321.             Top             =   1680
  322.             Value           =   1  'Checked
  323.             Width           =   2532
  324.          End
  325.          Begin VB.CheckBox ChkDoubleClick 
  326.             Caption         =   "&Double Click"
  327.             Height          =   252
  328.             Left            =   1800
  329.             TabIndex        =   37
  330.             Top             =   720
  331.             Value           =   1  'Checked
  332.             Width           =   1572
  333.          End
  334.          Begin VB.CheckBox ChkSingleClick 
  335.             Caption         =   "&Single Click"
  336.             Height          =   252
  337.             Left            =   1800
  338.             TabIndex        =   36
  339.             Top             =   240
  340.             Width           =   1572
  341.          End
  342.          Begin VB.CheckBox ChkRightButton 
  343.             Caption         =   "&Right Button"
  344.             Height          =   252
  345.             Left            =   120
  346.             TabIndex        =   35
  347.             Top             =   1200
  348.             Width           =   1692
  349.          End
  350.          Begin VB.CheckBox ChkMiddleButton 
  351.             Caption         =   "&Middle Button"
  352.             Height          =   252
  353.             Left            =   120
  354.             TabIndex        =   34
  355.             Top             =   720
  356.             Width           =   1692
  357.          End
  358.          Begin VB.CheckBox ChkLeftButton 
  359.             Caption         =   "&Left Button"
  360.             Height          =   252
  361.             Left            =   120
  362.             TabIndex        =   33
  363.             Top             =   240
  364.             Value           =   1  'Checked
  365.             Width           =   1692
  366.          End
  367.       End
  368.       Begin VB.Frame Frame4 
  369.          Caption         =   "Topic"
  370.          Height          =   612
  371.          Left            =   120
  372.          TabIndex        =   12
  373.          Top             =   960
  374.          Width           =   2532
  375.          Begin VB.Label TopicLabel 
  376.             Alignment       =   2  'Center
  377.             Caption         =   "SessionA"
  378.             Height          =   252
  379.             Left            =   120
  380.             TabIndex        =   13
  381.             Top             =   240
  382.             Width           =   2292
  383.          End
  384.       End
  385.       Begin VB.Label Label1 
  386.          Caption         =   "Session &Id"
  387.          Height          =   252
  388.          Left            =   120
  389.          TabIndex        =   1
  390.          Top             =   240
  391.          Width           =   972
  392.       End
  393.    End
  394.    Begin VB.Label ResultMessageLabel 
  395.       Alignment       =   2  'Center
  396.       Caption         =   "DDE Conversation Active"
  397.       ForeColor       =   &H00FF0000&
  398.       Height          =   252
  399.       Left            =   120
  400.       TabIndex        =   9
  401.       Top             =   2640
  402.       Visible         =   0   'False
  403.       Width           =   6252
  404.    End
  405. End
  406. Attribute VB_Name = "FormStartMouseIntercept"
  407. Attribute VB_Creatable = False
  408. Attribute VB_Exposed = False
  409. Dim MinimumHeight As Long
  410. Dim MinimumWidth  As Long
  411.  
  412. Dim OutputFrameWidth As Long
  413. Dim OutputFrameHeight As Long
  414.   
  415. Dim StartTop As Long
  416. Dim StartLeft As Long
  417.  
  418. Dim StopTop As Long
  419. Dim StopLeft As Long
  420.  
  421. Dim WidthDelta As Long
  422. Dim HeightDelta As Long
  423.  
  424. Dim ExitCommandTop As Long
  425. Dim ExitCommandLeft As Long
  426.  
  427. Dim ResultMessageWidth As Long
  428.  
  429. Private Sub ChkRetString_Click()
  430.   If ChkRetString.Value = 1 Then
  431.     RetrievedFrame.Enabled = True
  432.     RetrievedText.Enabled = True
  433.   Else
  434.     RetrievedFrame.Enabled = False
  435.     RetrievedText.Enabled = False
  436.   End If
  437. End Sub
  438.  
  439.  
  440. Private Sub ExitCommand_Click()
  441.     Unload FormStartMouseIntercept
  442. End Sub
  443.  
  444. Private Function GetTopicName() As String
  445.    If Len(SessionIdList.Text) > 0 Then
  446.       If TopicCheck.Value = CHECKED Then
  447.          ReturnString$ = "Session" + SessionIdList.Text
  448.       Else
  449.          ReturnString$ = "Sess" + SessionIdList.Text + "_" + UserDefStrText.Text
  450.       End If
  451.       GetTopicName = ReturnString$
  452.    Else
  453.       MsgBox MSG_PARA_ERROR, 48, MSG_SAMPLE_PROG
  454.    End If
  455. End Function
  456.  
  457. Private Function InputConditions$()
  458.   If ChkLeftButton.Value = CHECKED Then
  459.     temp$ = "L"
  460.   Else
  461.     temp$ = "l"
  462.   End If
  463.   If ChkMiddleButton.Value = CHECKED Then
  464.     temp$ = temp$ + "M"
  465.   Else
  466.     temp$ = temp$ + "m"
  467.   End If
  468.   If ChkRightButton.Value = CHECKED Then
  469.     temp$ = temp$ + "R"
  470.   Else
  471.     temp$ = temp$ + "r"
  472.   End If
  473.   If ChkSingleClick.Value = CHECKED Then
  474.     temp$ = temp$ + "S"
  475.   Else
  476.     temp$ = temp$ + "s"
  477.   End If
  478.   If ChkDoubleClick.Value = CHECKED Then
  479.     temp$ = temp$ + "D"
  480.   Else
  481.     temp$ = temp$ + "d"
  482.   End If
  483.   If ChkRetString.Value = CHECKED Then
  484.     temp$ = temp$ + "T"
  485.   Else
  486.     temp$ = temp$ + "t"
  487.   End If
  488.   InputConditions$ = temp$
  489. End Function
  490.  
  491. Private Sub Form_Load()
  492.   SessionIdList.ListIndex = 0
  493.       
  494.   MinimumWidth = Width
  495.   MinimumHeight = Height
  496.   
  497.   OutputFrameWidth = Frame3.Width
  498.   OutputFrameHeight = Frame3.Height
  499.   
  500.   StartTop = StartCommand.Top
  501.   StartLeft = StartCommand.Left
  502.  
  503.   StopTop = StopCommand.Top
  504.   StopLeft = StopCommand.Left
  505.   
  506.   ExitCommandTop = ExitCommand.Top
  507.   ExitCommandLeft = ExitCommand.Left
  508.  
  509.   ResultMessageWidth = ResultMessageLabel.Width
  510.  
  511.   AdjustForNT351 FormStartMouseIntercept
  512. End Sub
  513.  
  514. Private Sub Form_Resize()
  515. If (Width < MinimumWidth) Then
  516.   Width = MinimumWidth
  517. End If
  518.  
  519. If (Height < MinimumHeight) Then
  520.   Height = MinimumHeight
  521. End If
  522.   
  523. WidthDelta = Width - MinimumWidth
  524. HeightDelta = Height - MinimumHeight
  525.  
  526.   Frame3.Width = OutputFrameWidth + WidthDelta
  527.   Frame3.Height = OutputFrameHeight + HeightDelta
  528.   
  529.   StartCommand.Top = StartTop + HeightDelta
  530.   StartCommand.Left = StartLeft
  531.  
  532.   ExitCommand.Top = ExitCommandTop + HeightDelta
  533.   ExitCommand.Left = ExitCommandLeft + WidthDelta
  534.   
  535.   StopCommand.Top = StopTop + HeightDelta
  536.   StopCommand.Left = (StartCommand.Left + ExitCommand.Left) / 2
  537.   
  538.   ResultMessageLabel.Width = ResultMessageWidth + WidthDelta
  539.   Refresh
  540. End Sub
  541.  
  542.  
  543. Private Sub MouseInputText_Change()
  544.   Dim temp(1 To 8) As String
  545.   If (MouseInputText.LinkMode = HOT) And (MouseInputText.Text <> "") Then
  546.  
  547.     TimeLabel.Caption = Time
  548.     BeginPosition = 1
  549.     For Counter = 1 To 8
  550.       EndPosition = InStr(BeginPosition, MouseInputText.Text, Chr$(9))
  551.       temp(Counter) = Mid(MouseInputText.Text, BeginPosition, EndPosition - BeginPosition)
  552.       BeginPosition = EndPosition + 1
  553.     Next Counter
  554.     PSOffsetLabel.Caption = temp(1)
  555.     RowLabel.Caption = temp(2)
  556.     ColumnLabel.Caption = temp(3)
  557.     SizeOfPSLabel.Caption = temp(4)
  558.     NumberOfRowsLabel.Caption = temp(5)
  559.     NumberOfColumnsLabel.Caption = temp(6)
  560.     WhichButtonLabel.Caption = temp(7)
  561.     TypeOfClickLabel.Caption = temp(8)
  562.     RetrievedText.Text = Mid$(MouseInputText.Text, BeginPosition)
  563.     
  564.     PSDataLen& = Val(Left$(MouseInputText.Text, 4)) + 15
  565.     LogData$(LogEnd) = Time$ + ":Mouse was intercepted" + Chr$(13) + Chr$(10)
  566.     UpdateLogPointer
  567.     UpdateLog
  568.   End If
  569. End Sub
  570.  
  571. Private Sub Option2_Click()
  572.  
  573. End Sub
  574.  
  575. Private Sub StartCommand_Click()
  576. On Error GoTo ErrHandler
  577.    FunctionComp = True
  578.    
  579.    OldMousePointer = MousePointer
  580.    MousePointer = 11 ' Hour Glass Mouse Pointer
  581.    
  582.    MouseInputLog.Text = ""
  583.    
  584.    DisplayType$ = GetDisplayType$(SessionIdList.Text)
  585.    
  586.    If DisplayType$ = "NONE" Then
  587.       MousePointer = OldMousePointer
  588.       MsgBox MSG_INVALID_PSID + SessionIdList.Text, 48, MSG_SAMPLE_PROG
  589.       Exit Sub
  590.    End If
  591.    
  592.    Topic$ = GetTopicName()
  593.    If Len(Topic$) <= 0 Then
  594.      MsgBox MSG_PARA_ERROR, 48, MSG_SAMPLE_PROG
  595.      MousePointer = OldMousePointer
  596.      Exit Sub
  597.    End If
  598.  
  599.       Item$ = "MOUSE"
  600.       rc = DoEvents()           'If you use VisualBasic V2.0, call
  601.                                 'DoEvents function each time before
  602.                                 'starting DDE conversation.
  603.       MouseInputText.LinkTimeout = -1
  604.       MouseInputText.LinkTopic = APPLICATION_NAME + "|" + Topic$
  605.       MouseInputText.LinkItem = Item$
  606.             
  607.       MouseInputText.LinkMode = COLD
  608.       MouseInputText.Text = InputConditions$()
  609.       MouseInputText.LinkPoke
  610.       
  611.       MouseInputText.LinkMode = HOT
  612.       
  613.       MousePointer = OldMousePointer
  614.       If FunctionComp = True Then
  615.          ResultMessageLabel.Visible = True
  616.          EndStatus$ = MSG_OK
  617.          StartCommand.Enabled = False
  618.          StopCommand.Enabled = True
  619.          ExitCommand.Enabled = False
  620.          SessionIdList.Enabled = False
  621.          TopicCheck.Enabled = False
  622.          UserDefFrame.Enabled = False
  623.          UserDefStrText.Enabled = False
  624.          ChkLeftButton.Enabled = False
  625.          ChkRightButton.Enabled = False
  626.          ChkMiddleButton.Enabled = False
  627.          ChkSingleClick.Enabled = False
  628.          ChkDoubleClick.Enabled = False
  629.          ChkRetString.Enabled = False
  630.       Else
  631.          ResultMessageLabel.Visible = False
  632.          MsgBox MSG_DDE_ERROR, 48, MSG_SAMPLE_PROG
  633.          EndStatus$ = MSG_NG
  634.       End If
  635.       TempLogData$ = Time$ + ":Start Mouse Intercept : " + EndStatus$ + Chr$(13) + Chr$(10) + Chr$(9)
  636.       TempLogData$ = TempLogData$ + MSG_APPLICATION + APPLICATION_NAME + """" + Chr$(13) + Chr$(10) + Chr$(9)
  637.       TempLogData$ = TempLogData$ + MSG_TOPIC + """" + Topic$ + """" + Chr$(13) + Chr$(10) + Chr$(9)
  638.       TempLogData$ = TempLogData$ + MSG_ITEM + """" + Item$ + """" + Chr$(13) + Chr$(10)
  639.       LogData$(LogEnd) = TempLogData$
  640.       UpdateLogPointer
  641.       UpdateLog
  642.    Exit Sub
  643.  
  644. ErrHandler:
  645.    FunctionComp = False
  646.    Resume Next
  647.  
  648. End Sub
  649.  
  650. Private Sub StopCommand_Click()
  651. On Error GoTo StopErrHandler
  652.    FunctionComp = True
  653.    
  654.    MouseInputText.LinkTimeout = -1
  655.    MouseInputText.LinkMode = NONE
  656.    StartCommand.Enabled = True
  657.    If FunctionComp = True Then
  658.       ResultMessageLabel.Visible = False
  659.       EndStatus$ = MSG_OK
  660.       ExitCommand.Enabled = True
  661.       StartCommand.Enabled = True
  662.       SessionIdList.Enabled = True
  663.       TopicCheck.Enabled = True
  664.       TopicCheck_Click
  665.       ChkLeftButton.Enabled = True
  666.       ChkRightButton.Enabled = True
  667.       ChkMiddleButton.Enabled = True
  668.       ChkSingleClick.Enabled = True
  669.       ChkDoubleClick.Enabled = True
  670.       ChkRetString.Enabled = True
  671.    Else
  672.       MsgBox MSG_DDE_ERROR, 48, MSG_SAMPLE_PROG
  673.       EndStatus$ = MSG_NG
  674.    End If
  675.    LogData$(LogEnd) = Time$ + ":Stop Mouse Intercept : " + EndStatus$ + Chr$(13) + Chr$(10)
  676.    UpdateLogPointer
  677.    UpdateLog
  678.    Exit Sub
  679.  
  680. StopErrHandler:
  681.    FunctionComp = False
  682.    Resume Next
  683.  
  684. End Sub
  685.  
  686. Private Sub TopicCheck_Click()
  687.   If TopicCheck.Value = CHECKED Then
  688.     UserDefFrame.Enabled = False
  689.     UserDefStrText.Enabled = False
  690.   Else
  691.     UserDefFrame.Enabled = True
  692.     UserDefStrText.Enabled = True
  693.   End If
  694.   
  695.   TopicLabel.Caption = GetTopicName()
  696. End Sub
  697.  
  698. Private Sub UpdateLog()
  699.     temp$ = ""
  700.     If LogTop > LogEnd Then
  701.        For i% = LogTop To MAXLOGNUM
  702.           temp$ = temp$ + LogData$(i%)
  703.        Next
  704.        For i% = 0 To LogEnd
  705.           temp$ = temp$ + LogData$(i%)
  706.        Next
  707.     ElseIf LogTop < LogEnd Then
  708.        For i% = LogTop To LogEnd
  709.           temp$ = temp$ + LogData(i%)
  710.        Next
  711.     Else
  712.        temp$ = LogData(i%)
  713.     End If
  714.     MainForm.FunctionLog.Text = temp$
  715.     Loged = False
  716. End Sub
  717.  
  718. Private Sub UpdateLogPointer()
  719.     LogEnd = LogEnd + 1
  720.     If LogEnd = MAXLOGNUM + 1 Then
  721.        LogEnd = 0
  722.     End If
  723.  
  724.     If LogTop = LogEnd Then
  725.        LogTop = LogTop + 1
  726.        If LogTop = MAXLOGNUM + 1 Then
  727.           LogTop = 0
  728.        End If
  729.     End If
  730. End Sub
  731.  
  732. Private Sub UserDefStrText_Change()
  733.   TopicLabel.Caption = GetTopicName()
  734. End Sub
  735.  
  736.  
  737.