473,804 Members | 2,139 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 3486
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.Diagnos tics.Process.St art' 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.ac tivevb.de> wrote in message
news:#6******** ******@TK2MSFTN GP10.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.Diagnos tics.Process.St art' 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
1394
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 and below there are $no_of_add_file filefields. $no_of_add_file is an integer that determines the Maximum number of filefields that you want to associate/add for each product. So it succesfully adds the product and the files in a database and...
2
4973
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 the file extention is associated with a process(program/application) already, but throws an exception when there is no associated process. I would like to display an "Open With.." dialog box where the user can choose a program to open the file.
1
2928
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 sufficient free memory * Open the file with the text recovery I think it is some thing with word. Any suggestions??
2
4426
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 that extension and use that as my filter criteria for the File Open dialog. Once the user selects a file with that extension (from the File Open dialog), I simply want to open that file (whether it is an .xls file, .txt file, etc.). I am...
2
3533
by: key9 | last post by:
Hi all look at the organize tree main.c ------ #include lib_adapter.c main() { foo();
8
6946
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), save the file name to a string and then at some later stage open that file with word. The operating system will be windows 2000 (dont know if that makes a difference or not).
11
3530
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 the fee I pay for web hosting. 'Instant Website' provides the option of having your opening page as a Flash Page, which you'll see if you visit <www.alpha1.org.au>. Well, you'll see it if you visit from a Windows machine. For some reason, when...
1
3095
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
1525
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 how to register files in the system registry using python and also using Inno Setup which i use to package my applications, but i cant work out how if a file is doubled clicked on to send the path of that file to python. I have looked into...
0
10600
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10350
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10351
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
1
7638
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5534
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5673
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4311
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3834
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
3002
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.