📄 form1.frm
字号:
VERSION 5.00
Begin VB.Form Form1
Caption = "获得剪贴板中内容"
ClientHeight = 6216
ClientLeft = 2352
ClientTop = 1596
ClientWidth = 5172
LinkTopic = "Form1"
PaletteMode = 1 'UseZOrder
ScaleHeight = 6216
ScaleWidth = 5172
Begin VB.CommandButton Command2
Caption = "退出程序"
BeginProperty Font
Name = "MS Sans Serif"
Size = 9.6
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 492
Left = 1680
TabIndex = 8
Top = 5640
Width = 1332
End
Begin VB.Frame Frame1
Caption = "获得剪贴板中内容"
BeginProperty Font
Name = "MS Sans Serif"
Size = 9.6
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 5532
Left = 120
TabIndex = 0
Top = 0
Width = 4572
Begin VB.TextBox Text2
Height = 612
Left = 1800
MultiLine = -1 'True
ScrollBars = 2 'Vertical
TabIndex = 7
Top = 4680
Width = 2652
End
Begin VB.CommandButton Command1
Caption = "获得剪贴板内容"
BeginProperty Font
Name = "MS Sans Serif"
Size = 9.6
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 372
Left = 1320
TabIndex = 5
Top = 4080
Width = 1812
End
Begin VB.PictureBox Picture1
Height = 2772
Left = 1080
ScaleHeight = 2724
ScaleWidth = 3324
TabIndex = 2
Top = 1200
Width = 3372
End
Begin VB.TextBox Text1
Height = 852
Left = 1080
MultiLine = -1 'True
ScrollBars = 2 'Vertical
TabIndex = 1
Top = 240
Width = 3372
End
Begin VB.Label Label3
Caption = "剪贴板内容格式:"
BeginProperty Font
Name = "MS Sans Serif"
Size = 9.6
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 372
Left = 120
TabIndex = 6
Top = 5040
Width = 1572
End
Begin VB.Label Label2
Caption = "图像信息"
BeginProperty Font
Name = "MS Sans Serif"
Size = 9.6
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 492
Left = 120
TabIndex = 4
Top = 1200
Width = 852
End
Begin VB.Label Label1
Caption = "文本信息"
BeginProperty Font
Name = "MS Sans Serif"
Size = 9.6
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 372
Left = 120
TabIndex = 3
Top = 240
Width = 852
End
End
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Command1_Click()
Text1.Text = Clipboard.GetText 'Text from the clipboard is pasted in text1.text
Picture1.Picture = Clipboard.GetData 'If the data in the clipboard is a picture then it is pasted in pciture1.picture
Dim ClpFmt, Msg ' Declare variables.
On Error Resume Next ' Set up error handling.
If Clipboard.GetFormat(vbCFText) Then ClpFmt = ClpFmt + 1
If Clipboard.GetFormat(vbCFBitmap) Then ClpFmt = ClpFmt + 2
If Clipboard.GetFormat(vbCFDIB) Then ClpFmt = ClpFmt + 4
If Clipboard.GetFormat(vbCFRTF) Then ClpFmt = ClpFmt + 8
Select Case ClpFmt
Case 1
Msg = "剪贴板中只有文本内容!"
Case 2, 4, 6
Msg = "剪贴板中只有位图文件!"
Case 3, 5, 7
Msg = "剪贴板中包含有文本和位图!"
Case 8, 9
Msg = "剪贴板中只含有Rich Text!"
Case Else
Msg = "剪贴板中什么也没有!"
End Select
Text2 = Msg ' Display message.
End Sub
Private Sub Command2_Click()
Unload Me
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -