form1.vb
来自「vb 应用实例 简单应用 dddddddddddddddddddddddddd」· VB 代码 · 共 90 行
VB
90 行
Imports System.IO 'for File.Open
Public Class Form1
Inherits System.Windows.Forms.Form
#Region " Windows Form "
Public Sub New()
MyBase.New()
InitializeComponent()
End Sub
Protected Overloads Overrides Sub Dispose(ByVal disposing As Boolean)
If disposing Then
If Not (components Is Nothing) Then
components.Dispose()
End If
End If
MyBase.Dispose(disposing)
End Sub
Private components As System.ComponentModel.IContainer
Friend WithEvents Button1 As System.Windows.Forms.Button
Friend WithEvents Label1 As System.Windows.Forms.Label
Friend WithEvents TextBox1 As System.Windows.Forms.TextBox
Friend WithEvents Button2 As System.Windows.Forms.Button
Friend WithEvents Button3 As System.Windows.Forms.Button
Friend WithEvents Button4 As System.Windows.Forms.Button
Friend WithEvents Button5 As System.Windows.Forms.Button
<System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent()
Me.Button1 = New System.Windows.Forms.Button()
Me.Label1 = New System.Windows.Forms.Label()
Me.TextBox1 = New System.Windows.Forms.TextBox()
Me.Button2 = New System.Windows.Forms.Button()
Me.Button3 = New System.Windows.Forms.Button()
Me.Button4 = New System.Windows.Forms.Button()
Me.Button5 = New System.Windows.Forms.Button()
Me.SuspendLayout()
'
'Button1
'
Me.Button1.Location = New System.Drawing.Point(31, 40)
Me.Button1.Name = "Button1"
Me.Button1.Size = New System.Drawing.Size(194, 24)
Me.Button1.TabIndex = 0
Me.Button1.Text = "无异常处理程序"
'
'Label1
'
Me.Label1.Location = New System.Drawing.Point(31, 16)
Me.Label1.Name = "Label1"
Me.Label1.Size = New System.Drawing.Size(82, 23)
Me.Label1.TabIndex = 1
Me.Label1.Text = "打开文件"
'
'TextBox1
'
Me.TextBox1.Location = New System.Drawing.Point(123, 8)
Me.TextBox1.Name = "TextBox1"
Me.TextBox1.Size = New System.Drawing.Size(194, 21)
Me.TextBox1.TabIndex = 2
Me.TextBox1.Text = "C:\test.txt"
'
'Button2
'
Me.Button2.Location = New System.Drawing.Point(31, 80)
Me.Button2.Name = "Button2"
Me.Button2.Size = New System.Drawing.Size(194, 24)
Me.Button2.TabIndex = 3
Me.Button2.Text = "一般异常处理程序"
'
'Button3
'
Me.Button3.Location = New System.Drawing.Point(31, 121)
Me.Button3.Name = "Button3"
Me.Button3.Size = New System.Drawing.Size(194, 24)
Me.Button3.TabIndex = 4
Me.Button3.Text = "详细异常处理程序"
'
'Button4
'
Me.Button4.Location = New System.Drawing.Point(31, 160)
Me.Button4.Name = "Button4"
Me.Button4.Size = New System.Drawing.Size(194, 24)
Me.Button4.TabIndex = 5
Me.Button4.Text = "自定义异常信息
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?