module1.bas

来自「两种 不同 方式 实现 文件的 拖放」· BAS 代码 · 共 26 行

BAS
26
字号
Attribute VB_Name = "Module1"
Sub Main()
Dim xlenth As Integer
Dim xpath As String
Dim temp As String
Dim nstart As Integer
Form1.Show
xpath = Command
xlenth = Len(xpath)
nstart = InStrRev(xpath, ".")
 If xlenth - nstart = 4 Then
          temp = Mid(xpath, 2, xlenth - 2)
 Else
          temp = xpath
 End If
With Form1
.MMControl1.Command = "close"
.MMControl1.FileName = temp
.Label1.Caption = xpath
.Label2.Caption = temp
.MMControl1.Wait = True
.MMControl1.Command = "open"
.MMControl1.Command = "play"
End With
End Sub

⌨️ 快捷键说明

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