Go Back  Xtreme Visual Basic Talk > Legacy Visual Basic (VB 4/5/6) > General > How to ask system to open a selected file by itself


Reply
 
Thread Tools Display Modes
  #1  
Old 12-25-2004, 04:02 AM
rubia rubia is offline
Regular
 
Join Date: Jun 2004
Posts: 77
Default How to ask system to open a selected file by itself


Hi All,
I dont know it is right place to post or not,
i have problem ,i want to open a selected file in its system default application,for example ihave a file a.html now i want that on button press

1---it is opened by iexplorer or netescape whatever the system default is.no need to tell about the exe programe and its path to open as by shell commands.

becuse my application can select any type of file ,so it is necessary that my application ask system to open those files ,but how???
plz reply as soon as possible i need it urgent,and any wrriten piece of code will be preferable,
Best Regards to all
Reply With Quote
  #2  
Old 12-25-2004, 04:10 AM
alt_255's Avatar
alt_255 alt_255 is offline
Contributor
 
Join Date: Jun 2003
Location: Canberra, ACT, Australia
Posts: 489
Default

__________________
alt_255
Vires quod Veneratio

To understand recursion, we must first understand recursion
Reply With Quote
  #3  
Old 12-25-2004, 04:11 AM
eXeption's Avatar
eXeption eXeption is offline
Junior Contributor
 
Join Date: Aug 2004
Location: India
Posts: 270
Default

Use the ShellExecute() or ShellExecuteEx functions.
It'll open any type of document/EXEs with the associated Application.
__________________
"I think; therefore I am."
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump

Advertisement:





Free Publications
The ASP.NET 2.0 Anthology
101 Essential Tips, Tricks & Hacks - Free 156 Page Preview. Learn the most practical features and best approaches for ASP.NET.
subscribe
Programmers Heaven C# School Book -Free 338 Page eBook
The Programmers Heaven C# School book covers the .NET framework and the C# language.
subscribe
Build Your Own ASP.NET 3.5 Web Site Using C# & VB, 3rd Edition - Free 219 Page Preview!
This comprehensive step-by-step guide will help get your database-driven ASP.NET web site up and running in no time..
subscribe
 
 
-->