?? form1.frm
字號:
VERSION 5.00
Begin VB.Form Form1
AutoRedraw = -1 'True
BorderStyle = 3 'Fixed Dialog
Caption = "PaintPicture方法應用示例"
ClientHeight = 3150
ClientLeft = 45
ClientTop = 330
ClientWidth = 8145
LinkTopic = "Form1"
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 210
ScaleMode = 3 'Pixel
ScaleWidth = 543
ShowInTaskbar = 0 'False
StartUpPosition = 3 '窗口缺省
Begin VB.CommandButton Command4
Caption = "退出(&X)"
Height = 495
Left = 6360
TabIndex = 9
Top = 2520
Width = 1335
End
Begin VB.CommandButton Command3
Caption = "清除Picture3"
Height = 495
Left = 4920
TabIndex = 8
Top = 2520
Width = 1335
End
Begin VB.CommandButton Command2
Caption = "復制Picture2部分到Picture3"
Height = 495
Left = 2040
TabIndex = 4
Top = 2520
Width = 1815
End
Begin VB.PictureBox Picture3
Height = 2010
Left = 5400
ScaleHeight = 130
ScaleMode = 3 'Pixel
ScaleWidth = 165
TabIndex = 3
Top = 120
Width = 2535
End
Begin VB.PictureBox Picture2
AutoRedraw = -1 'True
BackColor = &H80000009&
Height = 2010
Left = 2160
Picture = "Form1.frx":0000
ScaleHeight = 130
ScaleMode = 3 'Pixel
ScaleWidth = 195
TabIndex = 2
Top = 120
Width = 2985
End
Begin VB.PictureBox Picture1
BackColor = &H80000009&
Height = 1530
Left = 240
Picture = "Form1.frx":2E67
ScaleHeight = 98
ScaleMode = 3 'Pixel
ScaleWidth = 107
TabIndex = 1
Top = 120
Width = 1665
End
Begin VB.CommandButton Command1
Caption = "Picture1復制到Picture2"
Height = 495
Left = 120
TabIndex = 0
Top = 2520
Width = 1815
End
Begin VB.Label Label3
Caption = "從Picture2中復制的部分圖形"
BeginProperty Font
Name = "宋體"
Size = 10.5
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 210
Left = 5280
TabIndex = 7
Top = 2160
Width = 2760
End
Begin VB.Label Label2
AutoSize = -1 'True
Caption = "目標圖形(Picture2)"
BeginProperty Font
Name = "宋體"
Size = 10.5
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 210
Left = 2760
TabIndex = 6
Top = 2160
Width = 1890
End
Begin VB.Label Label1
AutoSize = -1 'True
Caption = "源圖形(Picture1)"
BeginProperty Font
Name = "宋體"
Size = 10.5
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 210
Left = 240
TabIndex = 5
Top = 2160
Width = 1680
End
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Private Sub Command1_Click()
Dim width2, height2 As Single
width2 = Picture1.ScaleWidth
height2 = Picture1.ScaleHeight
Picture2.PaintPicture LoadPicture("C:\samples\boy.gif"), 0, 0, , , 0, 0, width2, height2, vbSrcAnd
End Sub
Private Sub Command2_Click()
Picture3.PaintPicture Picture2.Image, 0, 0, , , 0, 0, 120, 120, vbSrcCopy
End Sub
Private Sub Command3_Click()
Set Picture3.Picture = Nothing
End Sub
Private Sub Command4_Click()
End
End Sub
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -