VBNET第九章实验报告.doc
文本预览下载声明
VB.NET第九章实验报告
姓名:蒋一一 班级:计算机(中澳)122 学号:1120240036
源程序代码与贴图
9.2 创建菜单
创建菜单(贴图)
添加工具栏与控件
9. 2.3 为菜单编写代码
为 File 菜单编写代码
Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated() _
Partial Class Form1
Inherits System.Windows.Forms.Form
System.Diagnostics.DebuggerNonUserCode() _
Protected Overrides Sub Dispose(ByVal disposing As Boolean)
Try
If disposing AndAlso components IsNot Nothing Then
components.Dispose()
End If
Finally
MyBase.Dispose(disposing)
End Try
End Sub
Private Sub 新建NToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles 新建NToolStripMenuItem.Click
TextBox1.Text = String.Empty
TextBox2.Text = String.Empty
TextBox1.Focus()
新建NToolStripMenuItem_Click(sender, e)
Me.Close()
End Sub
Private Sub 撤消UToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles 撤消UToolStripMenuItem.Click
If TypeOf Me.ActiveControl Is TextBox Then
CType(Me.ActiveControl, TextBox).Undo()
End If
End Sub
Private Sub 剪切TToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles 剪切TToolStripMenuItem.Click
If TypeOf Me.ActiveControl Is TextBox Then
CType(Me.ActiveControl, TextBox).Cut()
End If
剪切TToolStripMenuItem_Click(sender, e)
End Sub
Private Sub 复制CToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles 复制CToolStripMenuItem.Click
If TypeOf Me.ActiveControl Is TextBox Then
CType(Me.ActiveControl, TextBox).Copy()
复制CToolStripMenuItem_Click(sender, e)
End If
End Sub
Private Sub 粘贴PToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles 粘贴PToolStripMenuItem.Click
If TypeOf Me.ActiveControl Is TextBox Then
显示全部