Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Button to open a file for another program... 2

Status
Not open for further replies.

blondends

Technical User
Apr 25, 2003
84
GB
Hi,

I am really stuck trying to work out how to code a button that will open up a program for a certian file. The database has a field that stores the path to a drawing. I need a button that when clicked will open the file with the right prog. Any ideas ?

Thanks in advance,

Chris
 
Make it a Hyperlink to the path and filename.

Then if your Windows file associations are correcly configured, the file will open with it's associated program.

Hope this helps
 
In the click event of the button, I would probably make a call to the ShellExecute API using the pathname as a parameter. That will in turn, open up the appropriate program for that particular file extension. In essence, it would be the same as double-clicking on that file from an explorer window.

Good Luck
--------------
As a circle of light increases so does the circumference of darkness around it. - Albert Einstein
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top