?? frmdebugging.vb
字號:
Public Class frmDebugging
Inherits System.Windows.Forms.Form
#Region " Windows Form Designer generated code "
Public Sub New()
MyBase.New()
'This call is required by the Windows Form Designer.
InitializeComponent()
'Add any initialization after the InitializeComponent() call
End Sub
'Form overrides dispose to clean up the component list.
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
Friend WithEvents txtValue As System.Windows.Forms.TextBox
Friend WithEvents btnDebug As System.Windows.Forms.Button
'Required by the Windows Form Designer
Private components As System.ComponentModel.Container
'NOTE: The following procedure is required by the Windows Form Designer
'It can be modified using the Windows Form Designer.
'Do not modify it using the code editor.
<System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent()
Me.txtValue = New System.Windows.Forms.TextBox()
Me.btnDebug = New System.Windows.Forms.Button()
Me.SuspendLayout()
'
'txtValue
'
Me.txtValue.Location = New System.Drawing.Point(24, 40)
Me.txtValue.Name = "txtValue"
Me.txtValue.TabIndex = 0
Me.txtValue.Text = ""
'
'btnDebug
'
Me.btnDebug.Location = New System.Drawing.Point(152, 40)
Me.btnDebug.Name = "btnDebug"
Me.btnDebug.TabIndex = 1
Me.btnDebug.Text = "Debug"
'
'frmDebugging
'
Me.AutoScaleBaseSize = New System.Drawing.Size(5, 13)
Me.ClientSize = New System.Drawing.Size(248, 85)
Me.Controls.AddRange(New System.Windows.Forms.Control() {Me.txtValue, Me.btnDebug})
Me.Name = "frmDebugging"
Me.Text = "Test Debugging"
Me.ResumeLayout(False)
End Sub
#End Region
'---------------------------
'Examine code from this point onwards
'TODO Put a breakpoint on the following line.
Private Sub btnDebug_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnDebug.Click
'call the PerformValidation sub passing in the value from the textbox
PerformValidation(txtValue.Text)
End Sub
Sub PerformValidation(ByVal strValue As String)
'check if a value was passed in the string
If strValue = "" Then
'display an error if no value found
MsgBox("No value has been entered", MsgBoxStyle.Critical, "Error")
Else
'display the passed in value if successful
MsgBox("The value entered was: " & strValue, MsgBoxStyle.Information, "Success")
End If
End Sub
End Class
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -