Hi all! I have one problem when i try to open exe with shell function it works fine but how can i open XY file using program who is designed to open that file. For example i have picture in mad in corel draw and i want tu open that file using corel draw. I cant use shell path/picture , style, does anyone knows how to do it or point me in right direction?

Real file i am trying to open isn't corel draw document, its vision builder file.

Thanks.

I actually don't understand your question ...
I think you mean the following, please say if I'm wrong:

-> I want to open a picture in Corel Draw using a program written in Visual Basic ...

Is that what you meant ?

In that case maybe the following information might be helpful for you: http://www.developerfusion.com/article/9/shell-and-shellexecute-function/
But you should adapt it to your needs ...

Hope this helps ...

if the third party software support that kind of method you're trying to do then you will be able to do so...

to check whether it can support with shell command.. go to command prompt then type:

like >>> corel plus_the_file_u_want_2_open.. if it will load and open the file success fully... i think you can do it also in using shell in VB..

--------------------
Just try..you'll never try you'll never know :)

Ok program doesn't support that kind of file opening so i will have to create shortcut of that file manually first since i find shortcut creation with vb kinda hard core now second thing bothers me when i select shortcut with CommonDialog in .filename option i don't get file name of shortcut i get file name of file he short cut me. Now i see that as new problem. :'(

try this:

the "C:\" location change it where your lnk file is located..

ShellExecute hWnd, "Open", "Test_lnk_file.lnk", vbNullString, "c:\", SW_SHOWNORMAL

try to visit this MS site:

http://support.microsoft.com/kb/238245

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.