473,385 Members | 1,732 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Associated File Type

I have a file extension that is associated to my application. Opening
a file with that extension starts my application OK, but how do I get
it to start with that selected file open?

With thanks
Dave

May 27 '06 #1
2 1165
>I have a file extension that is associated to my application. Opening
a file with that extension starts my application OK, but how do I get
it to start with that selected file open?


If the file association is set up correctly the file name will be
passed on the command line. Use a parameterized Main method

Shared Sub Main(ByVal CmdArgs As String())

or call System.Environment.GetCommandLineArgs to retrieve the file
path.
Mattias

--
Mattias Sjögren [C# MVP] mattias @ mvps.org
http://www.msjogren.net/dotnet/ | http://www.dotnetinterop.com
Please reply only to the newsgroup.
May 27 '06 #2
Thank you Mattias
You have set me off in the right direction

Best regards
Dave

May 27 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Philip Rayne | last post by:
Probably a bit of a newbie question this. I have an XML file like this: <?xml version="1.0" standalone="yes"?> <AuditLogonGroup xmlns="http://tempuri.org/AuditLogon.xsd"> <AuditLogon>...
4
by: Dietmar Kuehl | last post by:
Hi, after reading the documentation on C# generics from several sources, I'm still unclear whether it is possible to infer associated types from a type argument. For example, if I have an...
3
by: Brian Henry | last post by:
How would you get the associated icon for the file type of a file with a certain extension? like BMP, JPEG, MPEG, etc etc find their default icon using the File Types listing that associates the...
6
by: Brian Henry | last post by:
Hello, I have been working executeing files a user selects in a database, my problem is that the file type may or may not be associated in the end users system. How can I go about, when the user...
1
by: Vagabond Software | last post by:
I'm writing an application where then end-user will want to view and print (not edit) TIFF and JPEG images. For now, I simply use the System.Diagnostics.Process.Start method to open the desired...
5
by: IcingDeath via DotNetMonster.com | last post by:
I am building this SQL Server database app in which i can store files. In order to display files I want to have the app show the associated icon for the extension of the file that is in the...
4
by: Doug Bell | last post by:
Hi, I can probably use "Shell" function to open an app with a switch to open a selected file. But is it possible to read the application that a file type has been associated with to determine...
2
by: Doug Bell | last post by:
Hi, Recently I asked how to write code to open an App from its associated file. I got assistance from Ken show me the Process.Start command. I would now like to start the App that I have built...
5
by: =?Utf-8?B?TG9hbldvbGY=?= | last post by:
I'm working on a Windows Explorer-like application. What is the best way to find out what application is set to open a particular type of file? Is there a function to do this? Do I have to go...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.