📄 frmmain.vb
字号:
'Copyright (C) 2002 Microsoft Corporation
'All rights reserved.
'THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER
'EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES OF
'MERCHANTIBILITY AND/OR FITNESS FOR A PARTICULAR PURPOSE.
'Requires the Trial or Release version of Visual Studio .NET Professional (or greater).
Option Strict On
Public Class frmMain
Inherits System.Windows.Forms.Form
' The following Strings hold the various ways of formatting the
' "The Clipboard is Cool!" text.
Dim strText As String = "The Clipboard is Cool!"
Dim strHTML As String = "<P>The <B><FONT size='4'><U>Clipboard</U></FONT></B>" & _
"is <FONT size='5'>Cool!</FONT></P>"
Dim strRTF As String = "{\rtf1\ansi\ansicpg1252\deff0\deflang1033{\fonttbl{" & _
"\f0\fswiss\fcharset0 Arial;}}\viewkind4\uc1\pard\f0\fs20 The \ul\b\fs24 " & _
"Clipboard\ulnone\b0 \fs20 is \fs36 Cool!\par}"
Dim strXML As String = "<?xml version='1.0'?><Message>The Clipboard " & _
"is Cool!</Message>"
' myImage holds a Bitmap image of two dogs in memory.
Dim myImage As New System.Drawing.Bitmap("..\twodogs.jpg")
#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
' So that we only need to set the title of the application once,
' we use the AssemblyInfo class (defined in the AssemblyInfo.vb file)
' to read the AssemblyTitle attribute.
Dim ainfo As New AssemblyInfo()
Me.Text = ainfo.Title
Me.mnuAbout.Text = String.Format("&About {0} ...", ainfo.Title)
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
'Required by the Windows Form Designer
Private components As System.ComponentModel.IContainer
'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.
Friend WithEvents mnuMain As System.Windows.Forms.MainMenu
Friend WithEvents mnuFile As System.Windows.Forms.MenuItem
Friend WithEvents mnuExit As System.Windows.Forms.MenuItem
Friend WithEvents mnuHelp As System.Windows.Forms.MenuItem
Friend WithEvents mnuAbout As System.Windows.Forms.MenuItem
Friend WithEvents mnuEdit As System.Windows.Forms.MenuItem
Friend WithEvents txtPaste As System.Windows.Forms.TextBox
Friend WithEvents rtbPaste As System.Windows.Forms.RichTextBox
Friend WithEvents Label1 As System.Windows.Forms.Label
Friend WithEvents Label2 As System.Windows.Forms.Label
Friend WithEvents mnuCopyTextAs As System.Windows.Forms.MenuItem
Friend WithEvents mnuCopyTextAsText As System.Windows.Forms.MenuItem
Friend WithEvents mnuCopyTextAsHTML As System.Windows.Forms.MenuItem
Friend WithEvents mnuCopyTextAsRTF As System.Windows.Forms.MenuItem
Friend WithEvents mnuCopyTextAsAllFormats As System.Windows.Forms.MenuItem
Friend WithEvents mnuCopyImageAs As System.Windows.Forms.MenuItem
Friend WithEvents mnuCopyImageAsBitmap As System.Windows.Forms.MenuItem
Friend WithEvents Label3 As System.Windows.Forms.Label
Friend WithEvents Label4 As System.Windows.Forms.Label
Friend WithEvents picturePaste As System.Windows.Forms.PictureBox
Friend WithEvents mnuCopyTextAsXML As System.Windows.Forms.MenuItem
<System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent()
Dim resources As System.Resources.ResourceManager = New System.Resources.ResourceManager(GetType(frmMain))
Me.mnuMain = New System.Windows.Forms.MainMenu()
Me.mnuFile = New System.Windows.Forms.MenuItem()
Me.mnuExit = New System.Windows.Forms.MenuItem()
Me.mnuEdit = New System.Windows.Forms.MenuItem()
Me.mnuCopyTextAs = New System.Windows.Forms.MenuItem()
Me.mnuCopyTextAsText = New System.Windows.Forms.MenuItem()
Me.mnuCopyTextAsHTML = New System.Windows.Forms.MenuItem()
Me.mnuCopyTextAsRTF = New System.Windows.Forms.MenuItem()
Me.mnuCopyTextAsXML = New System.Windows.Forms.MenuItem()
Me.mnuCopyTextAsAllFormats = New System.Windows.Forms.MenuItem()
Me.mnuCopyImageAs = New System.Windows.Forms.MenuItem()
Me.mnuCopyImageAsBitmap = New System.Windows.Forms.MenuItem()
Me.mnuHelp = New System.Windows.Forms.MenuItem()
Me.mnuAbout = New System.Windows.Forms.MenuItem()
Me.txtPaste = New System.Windows.Forms.TextBox()
Me.rtbPaste = New System.Windows.Forms.RichTextBox()
Me.Label1 = New System.Windows.Forms.Label()
Me.Label2 = New System.Windows.Forms.Label()
Me.picturePaste = New System.Windows.Forms.PictureBox()
Me.Label3 = New System.Windows.Forms.Label()
Me.Label4 = New System.Windows.Forms.Label()
Me.SuspendLayout()
'
'mnuMain
'
Me.mnuMain.MenuItems.AddRange(New System.Windows.Forms.MenuItem() {Me.mnuFile, Me.mnuEdit, Me.mnuHelp})
Me.mnuMain.RightToLeft = CType(resources.GetObject("mnuMain.RightToLeft"), System.Windows.Forms.RightToLeft)
'
'mnuFile
'
Me.mnuFile.Enabled = CType(resources.GetObject("mnuFile.Enabled"), Boolean)
Me.mnuFile.Index = 0
Me.mnuFile.MenuItems.AddRange(New System.Windows.Forms.MenuItem() {Me.mnuExit})
Me.mnuFile.Shortcut = CType(resources.GetObject("mnuFile.Shortcut"), System.Windows.Forms.Shortcut)
Me.mnuFile.ShowShortcut = CType(resources.GetObject("mnuFile.ShowShortcut"), Boolean)
Me.mnuFile.Text = resources.GetString("mnuFile.Text")
Me.mnuFile.Visible = CType(resources.GetObject("mnuFile.Visible"), Boolean)
'
'mnuExit
'
Me.mnuExit.Enabled = CType(resources.GetObject("mnuExit.Enabled"), Boolean)
Me.mnuExit.Index = 0
Me.mnuExit.Shortcut = CType(resources.GetObject("mnuExit.Shortcut"), System.Windows.Forms.Shortcut)
Me.mnuExit.ShowShortcut = CType(resources.GetObject("mnuExit.ShowShortcut"), Boolean)
Me.mnuExit.Text = resources.GetString("mnuExit.Text")
Me.mnuExit.Visible = CType(resources.GetObject("mnuExit.Visible"), Boolean)
'
'mnuEdit
'
Me.mnuEdit.Enabled = CType(resources.GetObject("mnuEdit.Enabled"), Boolean)
Me.mnuEdit.Index = 1
Me.mnuEdit.MenuItems.AddRange(New System.Windows.Forms.MenuItem() {Me.mnuCopyTextAs, Me.mnuCopyImageAs})
Me.mnuEdit.Shortcut = CType(resources.GetObject("mnuEdit.Shortcut"), System.Windows.Forms.Shortcut)
Me.mnuEdit.ShowShortcut = CType(resources.GetObject("mnuEdit.ShowShortcut"), Boolean)
Me.mnuEdit.Text = resources.GetString("mnuEdit.Text")
Me.mnuEdit.Visible = CType(resources.GetObject("mnuEdit.Visible"), Boolean)
'
'mnuCopyTextAs
'
Me.mnuCopyTextAs.Enabled = CType(resources.GetObject("mnuCopyTextAs.Enabled"), Boolean)
Me.mnuCopyTextAs.Index = 0
Me.mnuCopyTextAs.MenuItems.AddRange(New System.Windows.Forms.MenuItem() {Me.mnuCopyTextAsText, Me.mnuCopyTextAsHTML, Me.mnuCopyTextAsRTF, Me.mnuCopyTextAsXML, Me.mnuCopyTextAsAllFormats})
Me.mnuCopyTextAs.Shortcut = CType(resources.GetObject("mnuCopyTextAs.Shortcut"), System.Windows.Forms.Shortcut)
Me.mnuCopyTextAs.ShowShortcut = CType(resources.GetObject("mnuCopyTextAs.ShowShortcut"), Boolean)
Me.mnuCopyTextAs.Text = resources.GetString("mnuCopyTextAs.Text")
Me.mnuCopyTextAs.Visible = CType(resources.GetObject("mnuCopyTextAs.Visible"), Boolean)
'
'mnuCopyTextAsText
'
Me.mnuCopyTextAsText.Enabled = CType(resources.GetObject("mnuCopyTextAsText.Enabled"), Boolean)
Me.mnuCopyTextAsText.Index = 0
Me.mnuCopyTextAsText.Shortcut = CType(resources.GetObject("mnuCopyTextAsText.Shortcut"), System.Windows.Forms.Shortcut)
Me.mnuCopyTextAsText.ShowShortcut = CType(resources.GetObject("mnuCopyTextAsText.ShowShortcut"), Boolean)
Me.mnuCopyTextAsText.Text = resources.GetString("mnuCopyTextAsText.Text")
Me.mnuCopyTextAsText.Visible = CType(resources.GetObject("mnuCopyTextAsText.Visible"), Boolean)
'
'mnuCopyTextAsHTML
'
Me.mnuCopyTextAsHTML.Enabled = CType(resources.GetObject("mnuCopyTextAsHTML.Enabled"), Boolean)
Me.mnuCopyTextAsHTML.Index = 1
Me.mnuCopyTextAsHTML.Shortcut = CType(resources.GetObject("mnuCopyTextAsHTML.Shortcut"), System.Windows.Forms.Shortcut)
Me.mnuCopyTextAsHTML.ShowShortcut = CType(resources.GetObject("mnuCopyTextAsHTML.ShowShortcut"), Boolean)
Me.mnuCopyTextAsHTML.Text = resources.GetString("mnuCopyTextAsHTML.Text")
Me.mnuCopyTextAsHTML.Visible = CType(resources.GetObject("mnuCopyTextAsHTML.Visible"), Boolean)
'
'mnuCopyTextAsRTF
'
Me.mnuCopyTextAsRTF.Enabled = CType(resources.GetObject("mnuCopyTextAsRTF.Enabled"), Boolean)
Me.mnuCopyTextAsRTF.Index = 2
Me.mnuCopyTextAsRTF.Shortcut = CType(resources.GetObject("mnuCopyTextAsRTF.Shortcut"), System.Windows.Forms.Shortcut)
Me.mnuCopyTextAsRTF.ShowShortcut = CType(resources.GetObject("mnuCopyTextAsRTF.ShowShortcut"), Boolean)
Me.mnuCopyTextAsRTF.Text = resources.GetString("mnuCopyTextAsRTF.Text")
Me.mnuCopyTextAsRTF.Visible = CType(resources.GetObject("mnuCopyTextAsRTF.Visible"), Boolean)
'
'mnuCopyTextAsXML
'
Me.mnuCopyTextAsXML.Enabled = CType(resources.GetObject("mnuCopyTextAsXML.Enabled"), Boolean)
Me.mnuCopyTextAsXML.Index = 3
Me.mnuCopyTextAsXML.Shortcut = CType(resources.GetObject("mnuCopyTextAsXML.Shortcut"), System.Windows.Forms.Shortcut)
Me.mnuCopyTextAsXML.ShowShortcut = CType(resources.GetObject("mnuCopyTextAsXML.ShowShortcut"), Boolean)
Me.mnuCopyTextAsXML.Text = resources.GetString("mnuCopyTextAsXML.Text")
Me.mnuCopyTextAsXML.Visible = CType(resources.GetObject("mnuCopyTextAsXML.Visible"), Boolean)
'
'mnuCopyTextAsAllFormats
'
Me.mnuCopyTextAsAllFormats.Enabled = CType(resources.GetObject("mnuCopyTextAsAllFormats.Enabled"), Boolean)
Me.mnuCopyTextAsAllFormats.Index = 4
Me.mnuCopyTextAsAllFormats.Shortcut = CType(resources.GetObject("mnuCopyTextAsAllFormats.Shortcut"), System.Windows.Forms.Shortcut)
Me.mnuCopyTextAsAllFormats.ShowShortcut = CType(resources.GetObject("mnuCopyTextAsAllFormats.ShowShortcut"), Boolean)
Me.mnuCopyTextAsAllFormats.Text = resources.GetString("mnuCopyTextAsAllFormats.Text")
Me.mnuCopyTextAsAllFormats.Visible = CType(resources.GetObject("mnuCopyTextAsAllFormats.Visible"), Boolean)
'
'mnuCopyImageAs
'
Me.mnuCopyImageAs.Enabled = CType(resources.GetObject("mnuCopyImageAs.Enabled"), Boolean)
Me.mnuCopyImageAs.Index = 1
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -