×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Contact US

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

simulate double clicking a file and opening

simulate double clicking a file and opening

simulate double clicking a file and opening

(OP)
I want to simulate the file opening that occurs when you go into mycomputer or windows explorer and double click on a file.  I create rtf files and want to have the default rtf file handler open them from within my program.  (I create a list of files linked to a customer and want operator to have ability to go into my program, select the customer, select the file and have it open in the default rtf file hander. (in my case it is word but could be WordPerfect!)  Is there an api that will help me do this?

RE: simulate double clicking a file and opening

See MSDN for ShellExecute/ShellExecuteEx functions.

RE: simulate double clicking a file and opening

(OP)
See posting by jimoo - uses shellexecute as you suggested - but with working example!

jimoo (Programmer) 13 Oct 05 22:50  
Take a look at my reply on forum: thread184-944857

You can use this snippet of code to launch the app or print it.  There are some comments to help you.
Jim Osieczonek
Delta Business Group, LLC
www.deltabg.com
 

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login


Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close