473,397 Members | 2,116 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,397 software developers and data experts.

opening files (edit verb) with associated program

I am writing a program that will search xml files for some of our dev team here
and list the files in a list box. I would like to be able to double-click on the
file name and have the file open with the users preferred editor. The problem is
that some of our teams uses different editors and I want the action to launch
the file with the edit verb so that the users editor will launch, regardless of
what that program is.

Is there a way to find out which exe is associated with the edit verb on a file
type? and launch it?

I have used the shell functions before when I knew specifically what the editor
was...but I don't want to have to handle every possible editor that we use.

Thanks,

Cy Huckaba
Austin, TX
Nov 20 '05 #1
2 3469
Hello,

"Cy Huckaba" <ru******@t-3.com> schrieb:
I am writing a program that will search xml files for some
of our dev team here and list the files in a list box. I
would like to be able to double-click on the file
name and have the file open with the users preferred
editor. The problem is that some of our teams uses different
editors and I want the action to launch the file with the edit
verb so that the users editor will launch, regardless of
what that program is.

Is there a way to find out which exe is associated with the
edit verb on a file type? and launch it?


Have a look at the 'System.Diagnostics.Process.Start' method.

HTH,
Herfried K. Wagner
--
MVP · VB Classic, VB.NET
http://www.mvps.org/dotnet
Nov 20 '05 #2
It looks like that's going to do it...thanks!

Cy

"Herfried K. Wagner [MVP]" <hi*******@m.activevb.de> wrote in message
news:#6**************@TK2MSFTNGP10.phx.gbl...
Hello,

"Cy Huckaba" <ru******@t-3.com> schrieb:
I am writing a program that will search xml files for some
of our dev team here and list the files in a list box. I
would like to be able to double-click on the file
name and have the file open with the users preferred
editor. The problem is that some of our teams uses different
editors and I want the action to launch the file with the edit
verb so that the users editor will launch, regardless of
what that program is.

Is there a way to find out which exe is associated with the
edit verb on a file type? and launch it?


Have a look at the 'System.Diagnostics.Process.Start' method.

HTH,
Herfried K. Wagner
--
MVP · VB Classic, VB.NET
http://www.mvps.org/dotnet

Nov 20 '05 #3

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

Similar topics

1
by: Angelos | last post by:
Hello, -I wrote a script that you use it to add products in the database. -Each product is associated with files. -In the Form to add the product you have to enter the product name in a textfield...
2
by: Gos | last post by:
Hi, I have a program that needs to open a list of attachments displayed on a ListView. I have used Process.Start method to open the files using their associated program. This works correctly if...
1
by: Thomas Beyerlein | last post by:
I am trying to open word with process.start but when it opens word it give me a error that says: Word experienced an error Try suggestions: * check the file permissions * Make sure there is...
2
by: OutdoorGuy | last post by:
Greetings, I have a "newbie" question in relation to opening files from C#. I have a Windows form where I allow the user to type in a file extension in a text box (e.g., "xls"). I then take...
2
by: key9 | last post by:
Hi all look at the organize tree main.c ------ #include lib_adapter.c main() { foo();
8
by: gazza67 | last post by:
Hi, I want to do something that I thought would be simple but i cant seem to work it out, perhaps someone out there could help me. I want to browse for a file (it will be a word document),...
11
by: emailus | last post by:
I am webmaster for the domain <www.alpha1.org.au>. Not being an expert in html, I take advantage of my domain Registrant's web building tool, 'Instant Website'. This tool is provided as part of...
1
by: Bill Nguyen | last post by:
I would like to open for view only or editing different file types in VB.NEt. For example: PDF BMP JPEG GIF DOC etc...
7
by: flarefight | last post by:
I am trying to make a a simple databasing GUI interface and and have created a module to deal with parsing the data from a file and a GUI based program that displays this data using PyQt4, i know...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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
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
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
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...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

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.