in my project i need to load another software (it is just for viewing purpose) through a Vb form . i tried to use OLE containers, but when i run d program and double-click the icon in the OLE container, it doesn't do anything, not even sends an error msg

can someone plz help me with this ??

in my project i need to load another software (it is just for viewing purpose) through a Vb form . i tried to use OLE containers, but when i run d program and double-click the icon in the OLE container, it doesn't do anything, not even sends an error msg

can someone plz help me with this ??

Try the following in your code with a command button. You need to know the path of the .exe you wish to run.

'Private Declare Function ShellExecute Lib "shell32.dll" Alias "ShellExecuteA" (ByVal hWind As Long, ByVal lpOperation As String, ByVal lpFile as String, ByVal lpParameters As String,ByVal lpDirectory as String,ByVal nShowCmd as Long) As Long

ShellExecute hWind, "open", apppath i.e. c:/ & "appname.exe", vbNullString, vbNullString, SW_SHOW


Hopes this helps. If it does then vote...

i am so grateful for your help but i cannot understand a part of the coding..

'Private Declare Function ShellExecute Lib "shell32.dll" Alias "ShellExecuteA"

can u plz tel me what it is ? coz i cant find a way to call that function in the button_click event

so sorry to trouble you

:) i searched web and found out what that shellexecute means

thank you sir , thannk you very much for your help

:) i searched web and found out what that shellexecute means

thank you sir , thannk you very much for your help

you can use Shell "c:\gems.exe".. you dont need any declaration..chow

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.