📄 frmpreview.frm
字号:
VERSION 5.00
Object = "{48E59290-9880-11CF-9754-00AA00C00908}#1.0#0"; "MSINET.OCX"
Object = "{D27CDB6B-AE6D-11CF-96B8-444553540000}#1.0#0"; "Flash9f.ocx"
Begin VB.Form frmPreview
BackColor = &H00F8EADF&
BorderStyle = 0 'None
Caption = "FLV Player"
ClientHeight = 3735
ClientLeft = 0
ClientTop = 0
ClientWidth = 4815
LinkTopic = "Form1"
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 3735
ScaleWidth = 4815
ShowInTaskbar = 0 'False
StartUpPosition = 1 'CenterOwner
Begin VB.Timer Timer2
Interval = 1000
Left = 600
Top = 3000
End
Begin VB.Timer Timer1
Enabled = 0 'False
Interval = 5
Left = 120
Top = 3000
End
Begin ShockwaveFlashObjectsCtl.ShockwaveFlash swf
Height = 3135
Left = 120
TabIndex = 3
Top = 120
Visible = 0 'False
Width = 4575
_cx = 8070
_cy = 5530
FlashVars = ""
Movie = ""
Src = ""
WMode = "Window"
Play = -1 'True
Loop = -1 'True
Quality = "High"
SAlign = ""
Menu = -1 'True
Base = ""
AllowScriptAccess= "always"
Scale = "ShowAll"
DeviceFont = 0 'False
EmbedMovie = 0 'False
BGColor = ""
SWRemote = ""
MovieData = ""
SeamlessTabbing = -1 'True
Profile = 0 'False
ProfileAddress = ""
ProfilePort = 0
AllowNetworking = "all"
AllowFullScreen = "false"
End
Begin InetCtlsObjects.Inet Inet1
Left = 9000
Top = 3000
_ExtentX = 1005
_ExtentY = 1005
_Version = 393216
End
Begin VB.CommandButton Command2
Caption = "FulScreen"
Enabled = 0 'False
Height = 315
Left = 240
TabIndex = 1
Top = 3360
Width = 1080
End
Begin VB.CommandButton Command1
Caption = "[x]"
Height = 315
Left = 4080
TabIndex = 0
Top = 3360
Width = 720
End
Begin VB.CommandButton cmdDes
Caption = "Description>>"
Enabled = 0 'False
Height = 315
Left = 2760
TabIndex = 4
Top = 3360
Width = 1215
End
Begin VB.CommandButton cmdHide
Caption = "<<Hide"
Height = 315
Left = 6720
TabIndex = 14
Top = 3240
Width = 1215
End
Begin VB.Label lblLoading
Alignment = 2 'Center
BackStyle = 0 'Transparent
Caption = "Loading Content ......."
BeginProperty Font
Name = "MS Sans Serif"
Size = 9.75
Charset = 0
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00C27C42&
Height = 495
Left = 600
TabIndex = 15
Top = 1560
Width = 3855
End
Begin VB.Label Label6
Alignment = 2 'Center
BackColor = &H00EF9F5D&
Caption = "Video Description"
BeginProperty Font
Name = "MS Sans Serif"
Size = 8.25
Charset = 0
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H8000000E&
Height = 255
Left = 5040
TabIndex = 13
Top = 120
Width = 4455
End
Begin VB.Label Label5
BackStyle = 0 'Transparent
Caption = "User:"
BeginProperty Font
Name = "MS Sans Serif"
Size = 8.25
Charset = 0
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 255
Left = 5040
TabIndex = 12
Top = 480
Width = 1215
End
Begin VB.Label Label2
BackStyle = 0 'Transparent
Caption = "Description:"
Height = 255
Left = 5040
TabIndex = 11
Top = 840
Width = 975
End
Begin VB.Label lblUn
BackStyle = 0 'Transparent
Caption = "UserName"
BeginProperty Font
Name = "MS Sans Serif"
Size = 8.25
Charset = 0
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 255
Left = 6120
TabIndex = 10
Top = 480
Width = 3255
End
Begin VB.Label lblDesc
BackStyle = 0 'Transparent
Caption = "Desc"
Height = 1695
Left = 6120
TabIndex = 9
Top = 840
Width = 3255
End
Begin VB.Label Label3
BackStyle = 0 'Transparent
Caption = "Category:"
ForeColor = &H000040C0&
Height = 255
Left = 5040
TabIndex = 8
Top = 2640
Width = 855
End
Begin VB.Label Label4
BackStyle = 0 'Transparent
Caption = "Date:"
ForeColor = &H00800000&
Height = 255
Left = 5040
TabIndex = 7
Top = 3000
Width = 735
End
Begin VB.Label lblCat
BackStyle = 0 'Transparent
Caption = "Category"
ForeColor = &H000040C0&
Height = 255
Left = 6120
TabIndex = 6
Top = 2640
Width = 3375
End
Begin VB.Label lblDt
BackStyle = 0 'Transparent
Caption = "Date"
ForeColor = &H00800000&
Height = 255
Left = 6120
TabIndex = 5
Top = 3000
Width = 3495
End
Begin VB.Label Label1
BackStyle = 0 'Transparent
Caption = "Click Play"
BeginProperty Font
Name = "MS Sans Serif"
Size = 8.25
Charset = 0
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00EF9F5D&
Height = 255
Left = 1440
TabIndex = 2
Top = 3360
Width = 2175
End
Begin VB.Shape Shape1
BorderColor = &H00C27C42&
Height = 3735
Left = 5
Top = 5
Width = 4815
End
End
Attribute VB_Name = "frmPreview"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim flag As Boolean
Dim state As Boolean
Private Sub cmdDes_Click()
Command2.Enabled = False
flag = False
Timer1.Enabled = True
End Sub
Private Sub cmdHide_Click()
flag = True
Timer1.Enabled = True
End Sub
Private Sub Command1_Click()
Unload Me
End Sub
Private Sub Command2_Click()
'Shape1.Visible = False
state = True
If Command2.Caption = "Normal" Then
Command2.Caption = "FulScreen"
Me.WindowState = 0
'swf.Visible = False
fs
state = False
Exit Sub
End If
Command2.Caption = "Normal"
Me.WindowState = 2
fs
swf.Visible = True
state = False
End Sub
Private Sub Form_Load()
'If ShockWave FLash is use use following Line
swf.Movie = App.Path & "\flv_video.swf"
End Sub
Private Sub Form_Resize()
If state Then
Else
Me.Left = (Screen.Width / 2) - (Me.Width / 2)
End If
End Sub
Private Sub Inet1_StateChanged(ByVal state As Integer)
Label1.Caption = GetStatus(state, Inet1)
End Sub
Private Sub Timer1_Timer()
'Animation effect, i hope you'll like it
'9630
'4815
If flag Then
Me.Width = Me.Width - 100
Shape1.Width = Shape1.Width - 100
If Me.Width <= 4815 Then
Timer1.Enabled = False
flag = False
Command2.Enabled = True
End If
Else
Me.Width = Me.Width + 100
Shape1.Width = Shape1.Width + 100
If Me.Width >= 9630 Then
Timer1.Enabled = False
loadData
End If
End If
End Sub
Private Sub loadData()
lblUn.Caption = videouName
lblDesc.Caption = videoDsc
lblCat.Caption = videoCat
lblDt.Caption = videoDt
End Sub
Private Sub fs()
Shape1.Width = Me.Width
Shape1.Height = Me.Height
swf.Width = Me.Width - 270
swf.Height = Me.Height - 500
Command2.Top = Me.Height - 400
''Label1.Left = Me.Width / 2 + 2600
''Label1.Top = Me.Height - 400
Command2.Left = Me.Width / 2 - 2400
Command1.Top = Me.Height - 400
Command1.Left = Me.Width / 2 + 1600
'cmdDes.Top = Me.Height - 400
'cmdDes.Left = Me.Width / 2 + 1000
End Sub
Private Sub Timer2_Timer()
If (frmSearch.l1.List(frmSearch.l2.ListIndex)) = "" Then
lblLoading.Caption = "Please select a video from list!!!"
Else
flvfile1 = GetVideoFile("http://youtube.com/watch?v=" & frmSearch.l1.List(frmSearch.l2.ListIndex), Inet1)
'If ShockWave FLash is use use following Line
Call frmPreview.swf.SetVariable("Movie", flvfile1)
swf.Visible = True
cmdDes.Enabled = True
Command2.Enabled = True
End If
Timer2.Enabled = False
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -