frmcover.frm

来自「一个无需MP3控件的MP3播放器源码」· FRM 代码 · 共 50 行

FRM
50
字号
VERSION 5.00
Begin VB.Form frmAlbum 
   BackColor       =   &H00000000&
   Caption         =   "Now Playing"
   ClientHeight    =   1395
   ClientLeft      =   1365
   ClientTop       =   1485
   ClientWidth     =   1650
   Icon            =   "frmCover.frx":0000
   KeyPreview      =   -1  'True
   LinkTopic       =   "Form1"
   PaletteMode     =   1  'UseZOrder
   ScaleHeight     =   1395
   ScaleWidth      =   1650
   Begin VB.Image Cover 
      Height          =   1350
      Left            =   0
      Stretch         =   -1  'True
      Top             =   0
      Width           =   1605
   End
End
Attribute VB_Name = "frmAlbum"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
'Album Cover window
'==================
' Displays album cover bitmaps corresponding to the playlist
' The bitmap is square and centred on the form

'Initialize the form by reloading picture
Private Sub Form_Load()
    F$ = frmVBAmp.LastCover
    If Exists(F$) = True Then Cover.Picture = LoadPicture(F$)
End Sub

'Scale and centre the bitmap on the form
Private Sub Form_Resize()
    'Calculate minimum dimension
    Min = ScaleWidth
    If ScaleHeight < Min Then Min = ScaleHeight
    'Calculate offset needed to centre bitmap in form
    OW = (ScaleWidth - Min) / 2
    OH = (ScaleHeight - Min) / 2
    'Move the bitmap
    Cover.Move OW, OH, Min, Min
End Sub

⌨️ 快捷键说明

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