- Public Sub Init()
- On Error GoTo Trap
- ErrorTypes.Form.Controls.Remove "cPicturebox" & ErrorTypes.Count
- Set lContainer = ErrorTypes.Form.Controls.Add("VB.Picturebox", "cPicturebox" & ErrorTypes.Count, ErrorTypes.PBox)
- ErrorTypes.Form.Controls.Remove "cIDLabel" & ErrorTypes.Count
- Set lIDLabel = ErrorTypes.Form.Controls.Add("VB.Label", "cIDLabel" & ErrorTypes.Count, lContainer)
- ErrorTypes.Form.Controls.Remove "cIDTextbox" & ErrorTypes.Count
- Set lIDTextbox = ErrorTypes.Form.Controls.Add("VB.Textbox", "cIDTextbox" & ErrorTypes.Count, lContainer)
- ErrorTypes.Form.Controls.Remove "cUserLabel" & ErrorTypes.Count
- Set lUserLabel = ErrorTypes.Form.Controls.Add("VB.Label", "cUserLabel" & ErrorTypes.Count, lContainer)
- ErrorTypes.Form.Controls.Remove "cUserTextbox" & ErrorTypes.Count
- Set lUserTextbox = ErrorTypes.Form.Controls.Add("VB.Textbox", "cUserTextbox" & ErrorTypes.Count, lContainer)
- ErrorTypes.Form.Controls.Remove "cDateLabel" & ErrorTypes.Count
- Set lDateLabel = ErrorTypes.Form.Controls.Add("VB.Label", "cDateLabel" & ErrorTypes.Count, lContainer)
- ErrorTypes.Form.Controls.Remove "cDateTextbox" & ErrorTypes.Count
- Set lDateTextbox = ErrorTypes.Form.Controls.Add("VB.Textbox", "cDateTextbox" & ErrorTypes.Count, lContainer)
- ErrorTypes.Form.Controls.Remove "cTypeLabel" & ErrorTypes.Count
- Set lTypeLabel = ErrorTypes.Form.Controls.Add("VB.Label", "cTypeLabel" & ErrorTypes.Count, lContainer)
- ErrorTypes.Form.Controls.Remove "cTypeTextbox" & ErrorTypes.Count
- Set lTypeTextbox = ErrorTypes.Form.Controls.Add("VB.Textbox", "cTypeTextbox" & ErrorTypes.Count, lContainer)
- ErrorTypes.Form.Controls.Remove "cDescriptionLabel" & ErrorTypes.Count
- Set lDescriptionLabel = ErrorTypes.Form.Controls.Add("VB.Label", "cDescriptionLabel" & ErrorTypes.Count, lContainer)
- ErrorTypes.Form.Controls.Remove "cDescriptionTextbox" & ErrorTypes.Count
- Set lDescriptionTextbox = ErrorTypes.Form.Controls.Add("RichText.RichTextCTRL.1", "cDescriptionTextbox" & ErrorTypes.Count, lContainer)
- With lContainer
- .Visible = True
- '.ScaleHeight = 1050
- 'mvarHeight = .Height
- '.ScaleWidth = ErrorTypes.PBox.Width
- .Appearance = 0
- .BorderStyle = 0
- .BackColor = vbWhite
- End With
- With lIDLabel
- .Visible = True
- .Caption = " " & mvarSType & " ID: "
- .BackColor = 14408667
- .AutoSize = True
- End With
- With lIDTextbox
- .Visible = True
- .Text = mvarID
- .BorderStyle = 0
- .BackColor = 14408667
- .Height = lIDLabel.Height
- .Locked = True
- End With
- With lUserLabel
- .Visible = True
- .Caption = "User: "
- .BackColor = 14408667
- '.AutoSize = True
- End With
- With lUserTextbox
- .Visible = True
- .Text = mvarUser
- .BorderStyle = 0
- .BackColor = 14408667
- .Height = lUserLabel.Height
- .Locked = True
- End With
- With lDateLabel
- .Visible = True
- .Caption = "Date: "
- .BackColor = 14408667
- '.AutoSize = True
- End With
- With lDateTextbox
- .Visible = True
- .Text = mvarTimestamp
- .BorderStyle = 0
- .BackColor = 14408667
- .Height = lDateLabel.Height
- .Locked = True
- End With
- With lTypeLabel
- .Visible = True
- .Caption = " Label: "
- .BackColor = vbWhite
- '.AutoSize = True
- End With
- With lTypeTextbox
- .Visible = True
- .Text = mvarEType
- .Height = lTypeLabel.Height
- .Locked = True
- End With
- With lDescriptionLabel
- .Visible = True
- .Caption = "Notes: "
- .BackColor = vbWhite
- '.AutoSize = True
- End With
- With lDescriptionTextbox
- .Visible = True
- .Text = mvarDescription
- .Height = (((ErrorTypes.Form.TextWidth(mvarDescription) - 150) \ .Width) + 1) * ErrorTypes.Form.TextHeight(mvarDescription) + 150 'lDescriptionLabel.Height
- .Locked = True
- End With
- Exit Sub
- Trap:
- Select Case Err.Number
- Case 730
- Resume Next
- Case Else
- Exit Sub
- End Select