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

📄 图像旋转.frm

📁 一个图象处理的小软件
💻 FRM
字号:
VERSION 5.00
Begin VB.Form frmrotate 
   Caption         =   "图像旋转"
   ClientHeight    =   2280
   ClientLeft      =   60
   ClientTop       =   345
   ClientWidth     =   2880
   LinkTopic       =   "Form1"
   ScaleHeight     =   2280
   ScaleWidth      =   2880
   StartUpPosition =   3  '窗口缺省
   Begin VB.Frame Frame1 
      Caption         =   "图像旋转"
      Height          =   1935
      Left            =   120
      TabIndex        =   0
      Top             =   120
      Width           =   2535
      Begin VB.CommandButton Command2 
         Caption         =   "退出"
         Height          =   375
         Left            =   1440
         TabIndex        =   5
         Top             =   1200
         Width           =   855
      End
      Begin VB.CommandButton Command1 
         Caption         =   "旋转"
         Height          =   375
         Left            =   1440
         TabIndex        =   4
         Top             =   600
         Width           =   855
      End
      Begin VB.OptionButton Option3 
         Caption         =   "绕中心"
         Height          =   375
         Left            =   240
         TabIndex        =   3
         Top             =   1320
         Width           =   975
      End
      Begin VB.OptionButton Option2 
         Caption         =   "垂直"
         Height          =   375
         Left            =   240
         TabIndex        =   2
         Top             =   840
         Width           =   735
      End
      Begin VB.OptionButton Option1 
         Caption         =   "水平"
         Height          =   255
         Left            =   240
         TabIndex        =   1
         Top             =   360
         Width           =   735
      End
   End
End
Attribute VB_Name = "frmrotate"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Command1_Click()
frmMain.Label1.Caption = "旋转处理"
frmMain.Pic1.ScaleMode = 3
frmMain.Pic2.ScaleMode = 3
pic = frmMain.Pic1.Picture
frmMain.Pic2.ScaleWidth = frmMain.Pic1.ScaleWidth
frmMain.Pic2.ScaleHeight = frmMain.Pic1.ScaleHeight
'-----------------------------------------
'Picture1.PaintPicture pic, Picture1.Width, Picture1.Height, _
            Picture1.Width * -1, Picture1.Height * -1
'水平旋转
If Option1.Value = True Then
frmMain.Pic2.PaintPicture pic, 0, 0, frmMain.Pic1.ScaleWidth, frmMain.Pic1.ScaleHeight, frmMain.Pic1.ScaleWidth * -1, frmMain.Pic1.ScaleHeight * -1
End If
'------------------------------------------
'垂直旋转
If Option2.Value = True Then
frmMain.Pic2.PaintPicture frmMain.Pic1.Image, 0, 0, _
frmMain.Pic1.ScaleWidth, frmMain.Pic1.ScaleHeight, _
 frmMain.Pic1.ScaleHeight, 0, -frmMain.Pic1.ScaleWidth, frmMain.Pic1.ScaleHeight
End If
'------------------------------------------
'绕中心旋转
If Option3.Value = True Then
frmMain.Pic2.PaintPicture frmMain.Pic1.Image, 0, 0, _
frmMain.Pic1.ScaleWidth, frmMain.Pic1.ScaleHeight, _
frmMain.Pic1.ScaleWidth, frmMain.Pic1.ScaleHeight, -frmMain.Pic1.ScaleWidth, _
-frmMain.Pic1.ScaleHeight
End If

End Sub

Private Sub Command2_Click()
Unload Me
End Sub

Private Sub Form_Load()
frmrotate.Left = 5500
frmrotate.Top = 6000
End Sub

⌨️ 快捷键说明

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