📄 flip.frm
字号:
VERSION 5.00
Begin VB.Form Form1
Caption = "翻转图像"
ClientHeight = 6384
ClientLeft = 60
ClientTop = 348
ClientWidth = 7752
LinkTopic = "Form1"
ScaleHeight = 6384
ScaleWidth = 7752
StartUpPosition = 3 '窗口缺省
Begin VB.CommandButton Command1
Caption = "垂直翻转"
Height = 495
Index = 1
Left = 1680
TabIndex = 2
Top = 5880
Width = 1215
End
Begin VB.CommandButton Command1
Caption = "水平翻转"
Height = 495
Index = 0
Left = 3960
TabIndex = 1
Top = 5880
Width = 1215
End
Begin VB.PictureBox Picture1
AutoSize = -1 'True
Height = 5808
Left = 0
Picture = "Flip.frx":0000
ScaleHeight = 5760
ScaleWidth = 7680
TabIndex = 0
Top = 0
Width = 7728
End
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Dim bHort As Boolean
Dim bVert As Boolean
Private Sub Command1_Click(Index As Integer)
Dim pic As StdPicture
Set pic = Picture1.Picture
Picture1.Cls
Select Case Index
Case 0
bHort = Not bHort
Case 1
bVert = Not bVert
End Select
If bHort And bVert Then
Picture1.PaintPicture pic, Picture1.Width, Picture1.Height, _
Picture1.Width * -1, Picture1.Height * -1
ElseIf bHort And Not bVert Then
Picture1.PaintPicture pic, Picture1.Width, 0, _
Picture1.Width * -1, Picture1.Height
ElseIf Not bHort And bVert Then
Picture1.PaintPicture pic, 0, Picture1.Height, _
Picture1.Width, Picture1.Height * -1
Else
Picture1.PaintPicture pic, 0, 0
End If
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -