Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

open file...

Posted on 2000-03-25
2
Medium Priority
?
159 Views
Last Modified: 2010-04-04
Hi,
Is there a windows api that I can call from delphi that has the same effect as right clicking an icon and selecting "open"
By doing this I want to open a .vcf file without needing to know what the current application associated with it is.

Any sample code or directions to web site most appreciated.

Mal
0
Comment
Question by:malcx
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
2 Comments
 
LVL 17

Accepted Solution

by:
inthe earned 400 total points
ID: 2657199
hi,
sure you can use shellexecute() api from shellapi unit.
example:

uses shellapi;

shellExecute('handle,'open',pchar('c:\some.vcf'),nil,nil,sw_normal);


Regards Barry
0
 
LVL 17

Expert Comment

by:inthe
ID: 2657201
typo:

ShellExecute(handle,'open',pchar('c:\some.vcf'),nil,nil,sw_normal);


also for executable files you can just use
winexec('c:\excel.exe',sw_normal);
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article explains how to create forms/units independent of other forms/units object names in a delphi project. Have you ever created a form for user input in a Delphi project and then had the need to have that same form in a other Delphi proj…
Introduction The parallel port is a very commonly known port, it was widely used to connect a printer to the PC, if you look at the back of your computer, for those who don't have newer computers, there will be a port with 25 pins and a small print…
Monitoring a network: how to monitor network services and why? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the philosophy behind service monitoring and why a handshake validation is critical in network monitoring. Software utilized …
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…
Suggested Courses

721 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question