📄 flip.frm
字号:
VERSION 5.00
Begin VB.Form Form1
Caption = "Form1"
ClientHeight = 4365
ClientLeft = 60
ClientTop = 345
ClientWidth = 5640
LinkTopic = "Form1"
ScaleHeight = 4365
ScaleWidth = 5640
StartUpPosition = 3 'Windows Default
Begin VB.CommandButton Command1
Caption = "垂直翻转"
Height = 495
Index = 1
Left = 960
TabIndex = 2
Top = 3720
Width = 1215
End
Begin VB.CommandButton Command1
Caption = "水平翻转"
Height = 495
Index = 0
Left = 3240
TabIndex = 1
Top = 3720
Width = 1215
End
Begin VB.PictureBox Picture1
AutoSize = -1 'True
Height = 3180
Left = 240
Picture = "Flip.frx":0000
ScaleHeight = 3120
ScaleWidth = 5100
TabIndex = 0
Top = 240
Width = 5160
End
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
'这个程序演示如何翻转图片
'
'作者 陈锐
'
'E-Mail develope@163.net
' blackcat@nease.net
'
'WebSite http://vbtips.yeah.net
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 + -