home *** CD-ROM | disk | FTP | other *** search
/ Chip 2004 May / CMCD0504.ISO / Software / Shareware / Programare / turboVB / Show Form / frmVBError.frm (.txt) next >
Encoding:
Visual Basic Form  |  2002-09-10  |  5.7 KB  |  171 lines

  1. VERSION 5.00
  2. Begin VB.Form frmVBError 
  3.    Caption         =   "Application Error"
  4.    ClientHeight    =   3480
  5.    ClientLeft      =   4920
  6.    ClientTop       =   2025
  7.    ClientWidth     =   6570
  8.    Icon            =   "frmVBError.frx":0000
  9.    LinkTopic       =   "Form1"
  10.    ScaleHeight     =   3480
  11.    ScaleWidth      =   6570
  12.    Begin VB.TextBox txtDescription 
  13.       BackColor       =   &H8000000F&
  14.       Height          =   1260
  15.       Left            =   1275
  16.       Locked          =   -1  'True
  17.       MultiLine       =   -1  'True
  18.       ScrollBars      =   2  'Vertical
  19.       TabIndex        =   7
  20.       TabStop         =   0   'False
  21.       Top             =   1740
  22.       Width           =   5280
  23.    End
  24.    Begin VB.CommandButton cmdClose 
  25.       Cancel          =   -1  'True
  26.       Caption         =   "&Close"
  27.       Default         =   -1  'True
  28.       Height          =   375
  29.       Left            =   5580
  30.       TabIndex        =   3
  31.       Tag             =   "1"
  32.       Top             =   3060
  33.       Width           =   975
  34.    End
  35.    Begin VB.TextBox txtSource 
  36.       BackColor       =   &H8000000F&
  37.       BeginProperty Font 
  38.          Name            =   "MS Sans Serif"
  39.          Size            =   8.25
  40.          Charset         =   0
  41.          Weight          =   700
  42.          Underline       =   0   'False
  43.          Italic          =   0   'False
  44.          Strikethrough   =   0   'False
  45.       EndProperty
  46.       Height          =   765
  47.       Left            =   1275
  48.       Locked          =   -1  'True
  49.       MultiLine       =   -1  'True
  50.       ScrollBars      =   2  'Vertical
  51.       TabIndex        =   6
  52.       TabStop         =   0   'False
  53.       Top             =   915
  54.       Width           =   5280
  55.    End
  56.    Begin VB.TextBox txtErrorNo 
  57.       BackColor       =   &H8000000F&
  58.       Height          =   315
  59.       Left            =   1275
  60.       Locked          =   -1  'True
  61.       TabIndex        =   5
  62.       TabStop         =   0   'False
  63.       Top             =   540
  64.       Width           =   5280
  65.    End
  66.    Begin VB.Label lblUserMessage 
  67.       AutoSize        =   -1  'True
  68.       Caption         =   "The application has generated an error."
  69.       Height          =   195
  70.       Left            =   1260
  71.       TabIndex        =   4
  72.       Tag             =   "3604"
  73.       Top             =   180
  74.       Width           =   3075
  75.    End
  76.    Begin VB.Label lblSource 
  77.       AutoSize        =   -1  'True
  78.       Caption         =   "Source:"
  79.       Height          =   195
  80.       Left            =   75
  81.       TabIndex        =   2
  82.       Tag             =   "3602"
  83.       Top             =   945
  84.       Width           =   555
  85.    End
  86.    Begin VB.Label lblDesc 
  87.       AutoSize        =   -1  'True
  88.       Caption         =   "Description:"
  89.       Height          =   195
  90.       Left            =   75
  91.       TabIndex        =   1
  92.       Tag             =   "3603"
  93.       Top             =   1890
  94.       Width           =   840
  95.    End
  96.    Begin VB.Label lblErrorNo 
  97.       AutoSize        =   -1  'True
  98.       Caption         =   "Number:"
  99.       Height          =   195
  100.       Left            =   75
  101.       TabIndex        =   0
  102.       Tag             =   "3601"
  103.       Top             =   600
  104.       Width           =   600
  105.    End
  106. Attribute VB_Name = "frmVBError"
  107. Attribute VB_GlobalNameSpace = False
  108. Attribute VB_Creatable = False
  109. Attribute VB_PredeclaredId = True
  110. Attribute VB_Exposed = False
  111. Option Explicit
  112. Public Error As ErrObject
  113. '***************************************************************************
  114. '*  Name         : cmdClose_Click
  115. '*  Description  : Close Form
  116. '*  Parameters   : None
  117. '*  Returns      : Nothing
  118. '*  Author       : Nigel
  119. '*  Date         : 22 May 2001
  120. '***************************************************************************
  121. Private Sub cmdClose_Click()
  122. On Error Resume Next
  123.     Me.Hide
  124. End Sub
  125. '***************************************************************************
  126. '*  Name         : Form_Load
  127. '*  Description  : Set Values
  128. '*  Parameters   : None
  129. '*  Returns      : Nothing
  130. '*  Author       : Nigel
  131. '*  Date         : 22 May 2001
  132. '***************************************************************************
  133. Private Sub Form_Load()
  134.     '****************************************
  135.     '* Load the values into the form.
  136.     '****************************************
  137.     With Error
  138.         txtErrorNo.Text = .Number
  139.         txtSource.Text = .Source
  140.         txtDescription.Text = .Description
  141.     End With
  142. End Sub
  143. '***************************************************************************
  144. '*  Name         : Form_Resize
  145. '*  Description  : Resize form
  146. '*  Parameters   : None
  147. '*  Returns      : Nothing
  148. '*  Author       : Nigel
  149. '*  Date         : 22 May 2001
  150. '***************************************************************************
  151. Private Sub Form_Resize()
  152. Dim intHeight As Integer, intLeft As Integer
  153. On Error Resume Next
  154.     AutoRedraw = False
  155.     If Me.Width < 6690 Then Me.Width = 6690
  156.     If Me.Height < 3885 Then Me.Height = 3885
  157.     intHeight = txtErrorNo.Top + txtErrorNo.Height + 60 + 970
  158.     txtSource.Height = (Me.Height - intHeight) * 0.4
  159.     txtDescription.Top = txtSource.Top + txtSource.Height + 60
  160.     txtDescription.Height = (Me.Height - intHeight) * 0.6
  161.     cmdClose.Top = txtDescription.Top + txtDescription.Height + 60
  162.     cmdClose.Left = Me.Width - 1110
  163.     intLeft = 1425
  164.     txtErrorNo.Width = Me.Width - intLeft
  165.     txtSource.Width = Me.Width - intLeft
  166.     txtDescription.Width = Me.Width - intLeft
  167.     lblSource.Top = txtSource.Top + 75
  168.     lblDesc.Top = txtDescription.Top + 75
  169.     AutoRedraw = True
  170. End Sub
  171.