📄 frmavitest.frm
字号:
VERSION 5.00
Object = "{BBB88E11-FB86-11D3-B06C-00500427A693}#1.0#0"; "vbalavi6.ocx"
Begin VB.Form frmAVITest
Caption = "vbAccelerator Transparent AVI Tester"
ClientHeight = 5085
ClientLeft = 2955
ClientTop = 1815
ClientWidth = 6075
BeginProperty Font
Name = "Tahoma"
Size = 8.25
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Icon = "frmAVITest.frx":0000
LinkTopic = "Form1"
ScaleHeight = 5085
ScaleWidth = 6075
Begin VB.CommandButton cmdBackColour
Caption = "&Background Colour..."
Height = 555
Left = 2700
TabIndex = 8
Top = 2280
Width = 1155
End
Begin VB.CheckBox chkBackgroundBitmap
Caption = "&Background Bitmap"
Height = 315
Left = 240
TabIndex = 7
Top = 3180
Value = 1 'Checked
Width = 2535
End
Begin vbalAVI6.vbalAVIPlayer vbalAVIPlayer1
Height = 2115
Left = 120
TabIndex = 6
Top = 120
Width = 2175
_ExtentX = 3836
_ExtentY = 3731
TransparentColor= 0
Transparent = -1 'True
End
Begin VB.CommandButton cmdTransColour
Caption = "&Transparent Colour..."
Height = 555
Left = 1500
TabIndex = 5
Top = 2280
Width = 1155
End
Begin VB.CheckBox chkCentre
Caption = "&Centre"
Height = 315
Left = 240
TabIndex = 4
Top = 2880
Width = 2535
End
Begin VB.CommandButton cmdOpen
Caption = "&Open..."
Height = 375
Left = 4440
TabIndex = 3
Top = 2280
Width = 1155
End
Begin VB.CheckBox chkRunning
Caption = "&Running"
Height = 315
Left = 240
TabIndex = 2
Top = 2580
Width = 2535
End
Begin VB.CheckBox chkTransparent
Caption = "&Transparent"
Height = 315
Left = 240
TabIndex = 1
Top = 2280
Value = 1 'Checked
Width = 2535
End
Begin VB.PictureBox picBackground
AutoSize = -1 'True
BeginProperty Font
Name = "MS Sans Serif"
Size = 8.25
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 1980
Left = 3000
Picture = "frmAVITest.frx":1272
ScaleHeight = 1920
ScaleWidth = 1920
TabIndex = 0
TabStop = 0 'False
Top = 60
Visible = 0 'False
Width = 1980
End
End
Attribute VB_Name = "frmAVITest"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Private Sub chkBackgroundBitmap_Click()
If (chkBackgroundBitmap.Value = vbChecked) Then
Set vbalAVIPlayer1.Picture = picBackground.Picture
Else
Set vbalAVIPlayer1.Picture = Nothing
End If
End Sub
Private Sub chkCentre_Click()
vbalAVIPlayer1.Centre = (chkCentre.Value = Checked)
End Sub
Private Sub chkRunning_Click()
vbalAVIPlayer1.Playing = (chkRunning.Value = Checked)
End Sub
Private Sub chkTransparent_Click()
vbalAVIPlayer1.Transparent = (chkTransparent.Value = Checked)
cmdTransColour.Enabled = vbalAVIPlayer1.Transparent
End Sub
Private Sub Command1_Click()
vbalAVIPlayer1.Playing = Not (vbalAVIPlayer1.Playing)
End Sub
Private Sub cmdBackColour_Click()
Dim cc As New cCommonDialog
Dim lColor As Long
lColor = vbalAVIPlayer1.BackColor
If cc.VBChooseColor(lColor, , True, , Me.hwnd) Then
vbalAVIPlayer1.BackColor = lColor
End If
End Sub
Private Sub cmdOpen_Click()
Dim sFIle As String
Dim cc As New cCommonDialog
If cc.VBGetOpenFileName(sFIle, , , , , , "AVI Files (*.AVI)|*.AVI|All Files (*.*)|*.*", 1, , "Open an AVI File", "AVI", Me.hwnd) Then
vbalAVIPlayer1.Filename = sFIle
vbalAVIPlayer1.Load
End If
End Sub
Private Sub cmdTransColour_Click()
Dim cc As New cCommonDialog
Dim lColor As Long
lColor = vbalAVIPlayer1.TransparentColor
If cc.VBChooseColor(lColor, , True, , Me.hwnd) Then
vbalAVIPlayer1.TransparentColor = lColor
End If
End Sub
Private Sub Form_Load()
With vbalAVIPlayer1
.Filename = App.Path & "\clock.avi"
.Load
.Picture = picBackground.Picture
.Transparent = True
.TransparentColor = &H0&
End With
End Sub
Private Sub Form_Resize()
vbalAVIPlayer1.Width = Me.ScaleWidth - vbalAVIPlayer1.Left * 2
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -