frmcover.frm
来自「一个类似于WinAmp的Mp3播放器,功能不错,有换肤等功能,是一个不错的vb播」· FRM 代码 · 共 52 行
FRM
52 行
VERSION 5.00
Begin VB.Form frmAlbum
BackColor = &H00000000&
Caption = "Now Playing"
ClientHeight = 1380
ClientLeft = 1365
ClientTop = 1485
ClientWidth = 1740
Icon = "frmCover.frx":0000
KeyPreview = -1 'True
LinkTopic = "Form1"
PaletteMode = 1 'UseZOrder
ScaleHeight = 1380
ScaleWidth = 1740
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()
Dim F As String
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()
Dim Min As Long, OW As Long, OH As Long
'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 + -
显示快捷键?