程序 Private Sub Form_Load()
MsgBox Command
End Sub
生成a.exe保存在c:\里注册表 在所有文件的右键菜单里加了个Test项 方法 我的电脑\HKEY_CLASSES_ROOT\*\shell
我的电脑\HKEY_CLASSES_ROOT\*\shell\Test
我的电脑\HKEY_CLASSES_ROOT\*\shell\Test\command
command的默认值是 "c:\a.exe" %1问题
当我点击一个文件右键选择 Test时,会弹出选择的那个文件名包括路径
打开一个a.exe 当我选择2个或多个文件右键选择 Test时,可以弹出选择的文件名包括路径
打开了2 或 多(和你选择的文件的个数相等) 个a.exe请问:
有没有办法选择多个文件后,打开的还是一个a.exe呢?
MsgBox Command
End Sub
生成a.exe保存在c:\里注册表 在所有文件的右键菜单里加了个Test项 方法 我的电脑\HKEY_CLASSES_ROOT\*\shell
我的电脑\HKEY_CLASSES_ROOT\*\shell\Test
我的电脑\HKEY_CLASSES_ROOT\*\shell\Test\command
command的默认值是 "c:\a.exe" %1问题
当我点击一个文件右键选择 Test时,会弹出选择的那个文件名包括路径
打开一个a.exe 当我选择2个或多个文件右键选择 Test时,可以弹出选择的文件名包括路径
打开了2 或 多(和你选择的文件的个数相等) 个a.exe请问:
有没有办法选择多个文件后,打开的还是一个a.exe呢?
If App.PrevInstance Then
BringWindowToTop frmMain.hwnd
Else
Load frmMain
End If
End Sub
If App.PrevInstance Then
end
Else
frmmain.show
End If
End Sub
的,怎么设置就可以选择多个文件而打开一个A.EXE呢,同时A.exe还可以接收到选择的多个文件名其实我的a.exe是一个文件加密的程序,可以单独的对一个文件加密,当同时选择2个文件的时候,它会打开2个a.exe。怎么解决呢??
我要的是选择2个文件后,右键Test打开一个a.exe
同时选择的文件名有弹出!
baoaya是不是走了大哥?其它人看看呀!
'【DDE用法的简单例子】新建工程,设窗体LinkMode为1
'窗体上放一个Text1,MultiLine和Locked设为真,添加代码:
Private Sub Form_LinkExecute(CmdStr As String, Cancel As Integer)
If Len(CmdStr) Then MngDDEMsg (CmdStr)
Cancel = 0: Me.SetFocus
End SubSub SendDDEMsg(ByVal Msg As String)
With Text1
.LinkTopic = App.Title & "|" & Form1.LinkTopic
.LinkMode = 2
.LinkExecute Msg
End With
End SubPrivate Sub Form_Load()
If App.PrevInstance Then
Call SendDDEMsg(Command)
Unload Me: End
Else
If Len(Command) Then MngDDEMsg (Command)
End If
End SubSub MngDDEMsg(ByVal Msg As String)
'这里替换成对命令参数的处理代码
Text1.SelStart = 0
Text1.SelText = Msg & vbCrLf & vbCrLf
End Sub
如:
shell app.path &"\a.exe " & " b1=c ;b2=c2 ",1
你再執行檔中分割參數就可
大家帮忙看看
c:\a.exe "%1"
试试
我想要的是,可以接收多个文件名但是只打开一个a.exe
先添加 一个list1 然后 替换initForm,ShowMessage 成下面2个 试试
Private Function initForm()
Me.Caption = APP_TITLE
If Len(Command) > 0 Then
List1.AddItem Command
End If
End FunctionPublic Function ShowMessage(strMsg As String)
List1.AddItem strMsg
End Function
[email protected]