VB 怎样拖放某个文件到程序图标后用该程序打开
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
Form1.Caption = temp
End Sub
【两种拖放效果.rar】点击下载此文件