home *** CD-ROM | disk | FTP | other *** search
/ Programming Tool Box / SIMS_2.iso / vb_code1 / errors / errors.frm < prev    next >
Text File  |  1993-12-13  |  18KB  |  539 lines

  1. VERSION 2.00
  2. Begin Form Errors 
  3.    BorderStyle     =   3  'Fixed Double
  4.    ClientHeight    =   3180
  5.    ClientLeft      =   1695
  6.    ClientTop       =   1485
  7.    ClientWidth     =   6720
  8.    ControlBox      =   0   'False
  9.    ForeColor       =   &H00FFFFFF&
  10.    Height          =   3585
  11.    Icon            =   ERRORS.FRX:0000
  12.    Left            =   1635
  13.    LinkTopic       =   "Form1"
  14.    MaxButton       =   0   'False
  15.    MinButton       =   0   'False
  16.    ScaleHeight     =   212
  17.    ScaleMode       =   3  'Pixel
  18.    ScaleWidth      =   448
  19.    Top             =   1140
  20.    Visible         =   0   'False
  21.    Width           =   6840
  22.    Begin PictureBox Picture2 
  23.       BorderStyle     =   0  'None
  24.       Height          =   372
  25.       Left            =   2280
  26.       ScaleHeight     =   375
  27.       ScaleWidth      =   4455
  28.       TabIndex        =   7
  29.       Top             =   2760
  30.       Width           =   4452
  31.       Begin CommandButton cmdAction 
  32.          Caption         =   "&More Info..."
  33.          Height          =   372
  34.          Index           =   2
  35.          Left            =   3000
  36.          TabIndex        =   8
  37.          Top             =   0
  38.          Width           =   1212
  39.       End
  40.       Begin CommandButton cmdAction 
  41.          Caption         =   "&Cancel"
  42.          Height          =   372
  43.          Index           =   1
  44.          Left            =   1320
  45.          TabIndex        =   9
  46.          Top             =   0
  47.          Width           =   1212
  48.       End
  49.       Begin CommandButton cmdAction 
  50.          Caption         =   "&OK"
  51.          Default         =   -1  'True
  52.          Height          =   372
  53.          Index           =   0
  54.          Left            =   0
  55.          TabIndex        =   10
  56.          Top             =   0
  57.          Width           =   1212
  58.       End
  59.    End
  60.    Begin PictureBox Picture1 
  61.       BorderStyle     =   0  'None
  62.       Height          =   1572
  63.       Left            =   120
  64.       ScaleHeight     =   1575
  65.       ScaleWidth      =   6495
  66.       TabIndex        =   5
  67.       Top             =   3240
  68.       Width           =   6492
  69.       Begin Label lblData 
  70.          BorderStyle     =   1  'Fixed Single
  71.          Caption         =   "21"
  72.          Height          =   252
  73.          Index           =   9
  74.          Left            =   4560
  75.          TabIndex        =   31
  76.          Top             =   240
  77.          Width           =   1812
  78.       End
  79.       Begin Label lblData 
  80.          BorderStyle     =   1  'Fixed Single
  81.          Caption         =   "3186"
  82.          Height          =   252
  83.          Index           =   8
  84.          Left            =   4560
  85.          TabIndex        =   30
  86.          Top             =   480
  87.          Width           =   1812
  88.       End
  89.       Begin Label lblData 
  90.          BorderStyle     =   1  'Fixed Single
  91.          Caption         =   "21"
  92.          Height          =   252
  93.          Index           =   7
  94.          Left            =   4560
  95.          TabIndex        =   29
  96.          Top             =   720
  97.          Width           =   1812
  98.       End
  99.       Begin Label lblData 
  100.          BorderStyle     =   1  'Fixed Single
  101.          Caption         =   "0.94.2"
  102.          Height          =   252
  103.          Index           =   6
  104.          Left            =   4560
  105.          TabIndex        =   28
  106.          Top             =   960
  107.          Width           =   1812
  108.       End
  109.       Begin Label lblData 
  110.          BorderStyle     =   1  'Fixed Single
  111.          Caption         =   "True"
  112.          Height          =   252
  113.          Index           =   5
  114.          Left            =   4560
  115.          TabIndex        =   27
  116.          Top             =   1200
  117.          Width           =   1812
  118.       End
  119.       Begin Label lblLabel 
  120.          Alignment       =   1  'Right Justify
  121.          Caption         =   "ErrCount%"
  122.          FontBold        =   0   'False
  123.          FontItalic      =   0   'False
  124.          FontName        =   "MS Sans Serif"
  125.          FontSize        =   8.25
  126.          FontStrikethru  =   0   'False
  127.          FontUnderline   =   0   'False
  128.          Height          =   252
  129.          Index           =   5
  130.          Left            =   3240
  131.          TabIndex        =   26
  132.          Top             =   240
  133.          Width           =   1212
  134.       End
  135.       Begin Label lblLabel 
  136.          Alignment       =   1  'Right Justify
  137.          Caption         =   "Err_Num"
  138.          FontBold        =   0   'False
  139.          FontItalic      =   0   'False
  140.          FontName        =   "MS Sans Serif"
  141.          FontSize        =   8.25
  142.          FontStrikethru  =   0   'False
  143.          FontUnderline   =   0   'False
  144.          Height          =   252
  145.          Index           =   6
  146.          Left            =   3240
  147.          TabIndex        =   25
  148.          Top             =   480
  149.          Width           =   1212
  150.       End
  151.       Begin Label lblLabel 
  152.          Alignment       =   1  'Right Justify
  153.          Caption         =   "Mod"
  154.          FontBold        =   0   'False
  155.          FontItalic      =   0   'False
  156.          FontName        =   "MS Sans Serif"
  157.          FontSize        =   8.25
  158.          FontStrikethru  =   0   'False
  159.          FontUnderline   =   0   'False
  160.          Height          =   252
  161.          Index           =   7
  162.          Left            =   3240
  163.          TabIndex        =   24
  164.          Top             =   720
  165.          Width           =   1212
  166.       End
  167.       Begin Label lblLabel 
  168.          Alignment       =   1  'Right Justify
  169.          Caption         =   "Rev_Code"
  170.          FontBold        =   0   'False
  171.          FontItalic      =   0   'False
  172.          FontName        =   "MS Sans Serif"
  173.          FontSize        =   8.25
  174.          FontStrikethru  =   0   'False
  175.          FontUnderline   =   0   'False
  176.          Height          =   252
  177.          Index           =   8
  178.          Left            =   3240
  179.          TabIndex        =   23
  180.          Top             =   960
  181.          Width           =   1212
  182.       End
  183.       Begin Label lblLabel 
  184.          Alignment       =   1  'Right Justify
  185.          Caption         =   "GDEBUG%"
  186.          FontBold        =   0   'False
  187.          FontItalic      =   0   'False
  188.          FontName        =   "MS Sans Serif"
  189.          FontSize        =   8.25
  190.          FontStrikethru  =   0   'False
  191.          FontUnderline   =   0   'False
  192.          Height          =   252
  193.          Index           =   9
  194.          Left            =   3240
  195.          TabIndex        =   22
  196.          Top             =   1200
  197.          Width           =   1212
  198.       End
  199.       Begin Label lblData 
  200.          BorderStyle     =   1  'Fixed Single
  201.          Caption         =   "9/15/93 9:30:03 am"
  202.          Height          =   252
  203.          Index           =   4
  204.          Left            =   1320
  205.          TabIndex        =   11
  206.          Top             =   1200
  207.          Width           =   1812
  208.       End
  209.       Begin Label lblData 
  210.          BorderStyle     =   1  'Fixed Single
  211.          Caption         =   "J. Eckart"
  212.          Height          =   252
  213.          Index           =   3
  214.          Left            =   1320
  215.          TabIndex        =   12
  216.          Top             =   960
  217.          Width           =   1812
  218.       End
  219.       Begin Label lblData 
  220.          BorderStyle     =   1  'Fixed Single
  221.          Caption         =   "4"
  222.          Height          =   252
  223.          Index           =   2
  224.          Left            =   1320
  225.          TabIndex        =   13
  226.          Top             =   720
  227.          Width           =   1812
  228.       End
  229.       Begin Label lblData 
  230.          BorderStyle     =   1  'Fixed Single
  231.          Caption         =   "Charles A. Gallo"
  232.          Height          =   252
  233.          Index           =   1
  234.          Left            =   1320
  235.          TabIndex        =   14
  236.          Top             =   480
  237.          Width           =   1812
  238.       End
  239.       Begin Label lblData 
  240.          BorderStyle     =   1  'Fixed Single
  241.          Caption         =   "CGALLO"
  242.          Height          =   252
  243.          Index           =   0
  244.          Left            =   1320
  245.          TabIndex        =   15
  246.          Top             =   240
  247.          Width           =   1812
  248.       End
  249.       Begin Label lblLabel 
  250.          Alignment       =   1  'Right Justify
  251.          Caption         =   "Date/Time"
  252.          FontBold        =   0   'False
  253.          FontItalic      =   0   'False
  254.          FontName        =   "MS Sans Serif"
  255.          FontSize        =   8.25
  256.          FontStrikethru  =   0   'False
  257.          FontUnderline   =   0   'False
  258.          Height          =   252
  259.          Index           =   4
  260.          Left            =   0
  261.          TabIndex        =   16
  262.          Top             =   1200
  263.          Width           =   1212
  264.       End
  265.       Begin Label lblLabel 
  266.          Alignment       =   1  'Right Justify
  267.          Caption         =   "User_Mgr"
  268.          FontBold        =   0   'False
  269.          FontItalic      =   0   'False
  270.          FontName        =   "MS Sans Serif"
  271.          FontSize        =   8.25
  272.          FontStrikethru  =   0   'False
  273.          FontUnderline   =   0   'False
  274.          Height          =   252
  275.          Index           =   3
  276.          Left            =   0
  277.          TabIndex        =   17
  278.          Top             =   960
  279.          Width           =   1212
  280.       End
  281.       Begin Label lblLabel 
  282.          Alignment       =   1  'Right Justify
  283.          Caption         =   "Security_Level%"
  284.          FontBold        =   0   'False
  285.          FontItalic      =   0   'False
  286.          FontName        =   "MS Sans Serif"
  287.          FontSize        =   8.25
  288.          FontStrikethru  =   0   'False
  289.          FontUnderline   =   0   'False
  290.          Height          =   252
  291.          Index           =   2
  292.          Left            =   0
  293.          TabIndex        =   18
  294.          Top             =   720
  295.          Width           =   1212
  296.       End
  297.       Begin Label lblLabel 
  298.          Alignment       =   1  'Right Justify
  299.          Caption         =   "User_Name"
  300.          FontBold        =   0   'False
  301.          FontItalic      =   0   'False
  302.          FontName        =   "MS Sans Serif"
  303.          FontSize        =   8.25
  304.          FontStrikethru  =   0   'False
  305.          FontUnderline   =   0   'False
  306.          Height          =   252
  307.          Index           =   1
  308.          Left            =   0
  309.          TabIndex        =   19
  310.          Top             =   480
  311.          Width           =   1212
  312.       End
  313.       Begin Label lblLabel 
  314.          Alignment       =   1  'Right Justify
  315.          Caption         =   "User_ID"
  316.          FontBold        =   0   'False
  317.          FontItalic      =   0   'False
  318.          FontName        =   "MS Sans Serif"
  319.          FontSize        =   8.25
  320.          FontStrikethru  =   0   'False
  321.          FontUnderline   =   0   'False
  322.          Height          =   252
  323.          Index           =   0
  324.          Left            =   0
  325.          TabIndex        =   20
  326.          Top             =   240
  327.          Width           =   1212
  328.       End
  329.       Begin Label Label6 
  330.          Caption         =   "(This information is useful for tech support.)"
  331.          FontBold        =   0   'False
  332.          FontItalic      =   0   'False
  333.          FontName        =   "MS Sans Serif"
  334.          FontSize        =   8.25
  335.          FontStrikethru  =   0   'False
  336.          FontUnderline   =   0   'False
  337.          Height          =   252
  338.          Left            =   1320
  339.          TabIndex        =   21
  340.          Top             =   0
  341.          Width           =   3132
  342.       End
  343.       Begin Label zCaption 
  344.          Alignment       =   1  'Right Justify
  345.          Caption         =   "Variables:"
  346.          Height          =   252
  347.          Left            =   120
  348.          TabIndex        =   6
  349.          Top             =   0
  350.          Width           =   1092
  351.       End
  352.    End
  353.    Begin Image imgPicture 
  354.       Height          =   570
  355.       Left            =   480
  356.       Picture         =   ERRORS.FRX:0302
  357.       Top             =   90
  358.       Width           =   585
  359.    End
  360.    Begin Image imgStorage 
  361.       Height          =   570
  362.       Index           =   3
  363.       Left            =   720
  364.       Picture         =   ERRORS.FRX:097C
  365.       Top             =   2520
  366.       Visible         =   0   'False
  367.       Width           =   585
  368.    End
  369.    Begin Image imgStorage 
  370.       Height          =   585
  371.       Index           =   2
  372.       Left            =   720
  373.       Picture         =   ERRORS.FRX:0FF6
  374.       Top             =   1920
  375.       Visible         =   0   'False
  376.       Width           =   600
  377.    End
  378.    Begin Image imgStorage 
  379.       Height          =   570
  380.       Index           =   1
  381.       Left            =   120
  382.       Picture         =   ERRORS.FRX:1698
  383.       Top             =   2520
  384.       Visible         =   0   'False
  385.       Width           =   585
  386.    End
  387.    Begin Image imgStorage 
  388.       Height          =   540
  389.       Index           =   0
  390.       Left            =   120
  391.       Picture         =   ERRORS.FRX:1D12
  392.       Top             =   1920
  393.       Visible         =   0   'False
  394.       Width           =   570
  395.    End
  396.    Begin Line Line1 
  397.       X1              =   416
  398.       X2              =   80
  399.       Y1              =   36
  400.       Y2              =   36
  401.    End
  402.    Begin Label lblHeadline 
  403.       Caption         =   "DBA VB Error Handler"
  404.       Height          =   255
  405.       Left            =   1200
  406.       TabIndex        =   4
  407.       Top             =   240
  408.       Width           =   4335
  409.    End
  410.    Begin Label lblResponse 
  411.       Caption         =   "When you're done, click on the Cancel button to quit."
  412.       FontBold        =   0   'False
  413.       FontItalic      =   0   'False
  414.       FontName        =   "MS Sans Serif"
  415.       FontSize        =   8.25
  416.       FontStrikethru  =   0   'False
  417.       FontUnderline   =   0   'False
  418.       Height          =   975
  419.       Left            =   2160
  420.       TabIndex        =   3
  421.       Top             =   1710
  422.       Width           =   3975
  423.    End
  424.    Begin Label Label3 
  425.       Alignment       =   1  'Right Justify
  426.       Caption         =   "What to Do:"
  427.       Height          =   255
  428.       Left            =   240
  429.       TabIndex        =   2
  430.       Top             =   1710
  431.       Width           =   1815
  432.    End
  433.    Begin Label Label2 
  434.       Alignment       =   1  'Right Justify
  435.       Caption         =   "What Happened:"
  436.       Height          =   255
  437.       Left            =   240
  438.       TabIndex        =   1
  439.       Top             =   720
  440.       Width           =   1815
  441.    End
  442.    Begin Label lblProblem 
  443.       Caption         =   "To test the error handler, double-click on the Error icon--you can then enter an error number and see what happens. (Don't know any errors off hand? Try 3197, 3186, or 3101.)"
  444.       FontBold        =   0   'False
  445.       FontItalic      =   0   'False
  446.       FontName        =   "MS Sans Serif"
  447.       FontSize        =   8.25
  448.       FontStrikethru  =   0   'False
  449.       FontUnderline   =   0   'False
  450.       Height          =   975
  451.       Left            =   2160
  452.       TabIndex        =   0
  453.       Top             =   720
  454.       Width           =   3975
  455.    End
  456. End
  457.  
  458. Sub cmdAction_Click (Index As Integer)
  459. ' Maintenance Header ============================================
  460. ' Version   Date        Coder       Action
  461. '   1       11/16/93    Murdoch     Initial keyin
  462. '
  463. ' Calls:
  464. '
  465.  
  466. ' Purpose:
  467. '   HEADS UP!!! Here's where I leave you high and dry.
  468. ' You're going to have to determine, based on how your
  469. ' program functions, what the effect of OK and Cancel will
  470. ' be. If you give the user the ability to view more data,
  471. ' you will have to be sure that the ErrorStruct data in-
  472. ' cludes information for the Data display.
  473.  
  474.  
  475. Select Case Index
  476.     Case 0                      ' OK
  477.     ' This command is here for the demo only--be sure
  478.     ' to remove it from your application!
  479.     If cmdAction(2).Enabled = False Then
  480.         If cmdAction(2).Visible = True Then
  481.         Me.Height = 3400
  482.         cmdAction(2).Enabled = True
  483.         End If
  484.     End If
  485.     
  486.     Case 1                      ' Cancel
  487.     ' This command is here for the demo only--be sure
  488.     ' to remove it from your application!
  489.     End
  490.     Case 2                      ' More Info
  491.     Me.Height = 5235
  492.     cmdAction(2).Enabled = False
  493. End Select
  494. End Sub
  495.  
  496. Sub imgPicture_DblClick ()
  497. Dim ErrorStruct As ErrorType
  498.  
  499. Msg$ = "Enter an error number:"
  500. Default$ = "3197"
  501. Title$ = "DBA VB Error Handler"
  502.  
  503. Response$ = InputBox$(Msg$, Title$, Default$)
  504.  
  505. ' This is a test--so I'm not going to bother trapping
  506. ' for the possibility that the user gets cute and enters
  507. ' non-numeric data. I'll let the app blow up instead....
  508.  
  509. On Error GoTo Chump
  510.  
  511. ErrorStruct.ErrNum = Val(Response$)
  512.  
  513. ErrorStruct.Label01 = "Module:"
  514. ErrorStruct.Label02 = "Author:"
  515. ErrorStruct.Label03 = "Dev'p For:"
  516. ErrorStruct.Label04 = "Issue Date:"
  517. ErrorStruct.Label05 = "Editor:"
  518. ErrorStruct.Data01 = "ERRORS.BAS"
  519. ErrorStruct.Data02 = "John Murdoch"
  520. ErrorStruct.Data03 = "Data Based Advisor"
  521. ErrorStruct.Data04 = "January, 1994"
  522. ErrorStruct.Data05 = "Barb Cole"
  523. ErrorStruct.Bitmap = 3
  524. ErrorStruct.MoreInfoVisible = True
  525.  
  526. Answer% = ErrorHandler(ErrorStruct)
  527.  
  528. Exit Sub
  529.  
  530. Chump:
  531. Beep
  532. Msg$ = "You have to enter an error NUMBER. Reload and try again."
  533. MsgBox Msg$, 16, "Oops! Try Again!"
  534. End
  535. Resume
  536.  
  537. End Sub
  538.  
  539.