⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 flip.frm

📁 在多媒体变成中经常会用到图像的翻转
💻 FRM
字号:
VERSION 5.00
Begin VB.Form Form1 
   BorderStyle     =   1  'Fixed Single
   Caption         =   "翻转图片效果"
   ClientHeight    =   3750
   ClientLeft      =   45
   ClientTop       =   330
   ClientWidth     =   5145
   LinkTopic       =   "Form1"
   LockControls    =   -1  'True
   MaxButton       =   0   'False
   ScaleHeight     =   3750
   ScaleWidth      =   5145
   StartUpPosition =   3  '窗口缺省
   Begin VB.CommandButton Command2 
      Caption         =   "退出"
      Height          =   420
      Left            =   3750
      TabIndex        =   3
      Top             =   3210
      Width           =   1215
   End
   Begin VB.CommandButton Command1 
      Caption         =   "垂直翻转"
      Height          =   420
      Index           =   1
      Left            =   3750
      TabIndex        =   2
      Top             =   135
      Width           =   1215
   End
   Begin VB.CommandButton Command1 
      Caption         =   "水平翻转"
      Height          =   420
      Index           =   0
      Left            =   3750
      TabIndex        =   1
      Top             =   630
      Width           =   1215
   End
   Begin VB.PictureBox Picture1 
      AutoSize        =   -1  'True
      Height          =   3510
      Left            =   135
      Picture         =   "Flip.frx":0000
      ScaleHeight     =   3450
      ScaleWidth      =   3450
      TabIndex        =   0
      Top             =   135
      Width           =   3510
   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

Private Sub Command2_Click()
  End
End Sub

Private Sub Form_Load()
  Me.Left = (Screen.Width - Me.Width) / 2
  Me.Top = (Screen.Height - Me.Height) / 2
End Sub

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -