form1.ebf
来自「windows mobile 应用程序开发实践一书的源代码」· EBF 代码 · 共 309 行
EBF
309 行
VERSION 5.00
Begin VB.Form Form1
Appearance = 0 'Flat
BackColor = &H00FFC0C0&
Caption = "Form1"
ClientHeight = 3795
ClientLeft = 60
ClientTop = 840
ClientWidth = 3780
ForeColor = &H80000008&
ScaleHeight = 3795
ScaleWidth = 3780
ShowOK = -1 'True
Begin VBCE.TextBox Text3
Height = 495
Left = 840
TabIndex = 8
Top = 1800
Width = 2295
_cx = 4048
_cy = 873
BackColor = -2147483643
BorderStyle = 1
Enabled = -1 'True
BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "MS Sans Serif"
Size = 8.25
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = -2147483640
Text = ""
Alignment = 0
HideSelection = -1 'True
Locked = 0 'False
MaxLength = 0
MultiLine = 0 'False
PasswordChar = ""
ScrollBars = 0
End
Begin VBCE.TextBox Text2
Height = 495
Left = 840
TabIndex = 7
Top = 1200
Width = 2295
_cx = 4048
_cy = 873
BackColor = -2147483643
BorderStyle = 1
Enabled = -1 'True
BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "MS Sans Serif"
Size = 8.25
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = -2147483640
Text = ""
Alignment = 0
HideSelection = -1 'True
Locked = 0 'False
MaxLength = 0
MultiLine = 0 'False
PasswordChar = ""
ScrollBars = 0
End
Begin VBCE.TextBox Text1
Height = 495
Left = 840
TabIndex = 6
Top = 600
Width = 2295
_cx = 4048
_cy = 873
BackColor = -2147483643
BorderStyle = 1
Enabled = -1 'True
BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "MS Sans Serif"
Size = 8.25
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = -2147483640
Text = ""
Alignment = 0
HideSelection = -1 'True
Locked = 0 'False
MaxLength = 0
MultiLine = 0 'False
PasswordChar = ""
ScrollBars = 0
End
Begin VBCE.Label Label4
Height = 375
Left = 0
TabIndex = 5
Top = 1800
Width = 975
_cx = 1720
_cy = 661
AutoSize = 0 'False
BackColor = 16761024
BackStyle = 1
BorderStyle = 0
Caption = "Number"
Enabled = -1 'True
BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "MS Sans Serif"
Size = 8.25
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = -2147483642
Alignment = 0
UseMnemonic = -1 'True
WordWrap = 0 'False
End
Begin VBCE.Label Label3
Height = 375
Left = 0
TabIndex = 4
Top = 1200
Width = 975
_cx = 1720
_cy = 661
AutoSize = 0 'False
BackColor = 16761024
BackStyle = 1
BorderStyle = 0
Caption = "Source"
Enabled = -1 'True
BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "MS Sans Serif"
Size = 8.25
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = -2147483642
Alignment = 0
UseMnemonic = -1 'True
WordWrap = 0 'False
End
Begin VBCE.CommandButton Command3
Height = 375
Left = 0
TabIndex = 3
Top = 2400
Width = 1095
_cx = 1931
_cy = 661
BackColor = 12632256
Caption = "Clear"
Enabled = -1 'True
BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "MS Sans Serif"
Size = 8.25
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Style = 0
End
Begin VBCE.CommandButton Command1
Height = 375
Left = 1320
TabIndex = 2
Top = 2400
Width = 1215
_cx = 2143
_cy = 661
BackColor = 12632256
Caption = "Raise"
Enabled = -1 'True
BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "MS Sans Serif"
Size = 8.25
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Style = 0
End
Begin VBCE.Label Label2
Height = 375
Left = 0
TabIndex = 1
Top = 600
Width = 975
_cx = 1720
_cy = 661
AutoSize = 0 'False
BackColor = 16761024
BackStyle = 1
BorderStyle = 0
Caption = "Description"
Enabled = -1 'True
BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "MS Sans Serif"
Size = 8.25
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = -2147483642
Alignment = 0
UseMnemonic = -1 'True
WordWrap = 0 'False
End
Begin VBCE.Label Label1
Height = 495
Left = 840
TabIndex = 0
Top = 0
Width = 1455
_cx = 2566
_cy = 873
AutoSize = 0 'False
BackColor = 16761087
BackStyle = 1
BorderStyle = 0
Caption = "Err对象使用方法"
Enabled = -1 'True
BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "MS Sans Serif"
Size = 8.25
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = -2147483640
Alignment = 0
UseMnemonic = -1 'True
WordWrap = 0 'False
End
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Const WidthError = 1
Const WidthHelp = 101
Private Sub Command1_Click()
TestWidth (0)
If Err.Number > 0 Then
MsgBox Err.Description
End If
End Sub
Private Sub Command3_Click()
Err.Clear
Text1.Text = Err.Description
Text2.Text = Err.Number
Text3.Text = Err.Source
MsgBox Err.Description
End Sub
Private Sub Form_Load()
Err.Description = "访问被拒绝"
Err.Number = vbObjectError + 1050
Err.Source = "分母不能为0,请检查,访问被拒绝"
Text1.Text = Err.Description
Text2.Text = Err.Number
Text3.Text = Err.Source
End Sub
Function TestWidth(ByVal width As Integer)
If width = 0 Then
Err.Raise vbObjectError + 512 + WidthError, "除法", "分母不能为0,请注意"
End If
End Function
' Add to calling function.
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?