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

📄 avi播放 1.frm

📁 Windows API函数,希望大伙有用哦
💻 FRM
字号:
VERSION 5.00
Begin VB.Form Form1 
   Caption         =   "Form1"
   ClientHeight    =   1470
   ClientLeft      =   60
   ClientTop       =   345
   ClientWidth     =   4335
   LinkTopic       =   "Form1"
   ScaleHeight     =   1470
   ScaleWidth      =   4335
   Begin VB.CommandButton Command2 
      Caption         =   "退    出"
      Height          =   315
      Left            =   3330
      TabIndex        =   1
      Top             =   1020
      Width           =   945
   End
   Begin VB.CommandButton Command1 
      Caption         =   "开始播放"
      Height          =   315
      Left            =   2280
      TabIndex        =   0
      Top             =   1020
      Width           =   1005
   End
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Private Declare Function mciSendString Lib "winmm.dll" Alias "mciSendStringA" (ByVal lpstrCommand As String, ByVal lpstrReturnString As String, ByVal uReturnLength As Long, ByVal hwndCallback As Long) As Long
Private Sub Command1_Click()
Dim FileName As String
FileName = "C:\FILECOPY.AVI"
Debug.Print FileName
mciSendString "open " & FileName & " type avivideo alias video", 0&, 0, 0
mciSendString "play video from 0", 0&, 0, 0
End Sub
Private Sub Command2_Click()
'关闭AVI播放
mciSendString "close video", 0&, 0, 0
End
End Sub

⌨️ 快捷键说明

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