473,395 Members | 1,774 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,395 software developers and data experts.

How to open (view/edit) files programmatically?

I would like to open for view only or editing different file types in
VB.NEt.
For example:
PDF
BMP
JPEG
GIF
DOC
etc...

Can use file association in Windows OS or to detect necessary application
based on file extension then invoke it.

Thanks

Bill
May 4 '07 #1
1 3060

To open a file with its associated app, you could use the following function
:

void ShellExecute(string cmd)
{
ProcessStartInfo pi = new ProcessStartInfo(cmd);
pi.UseShellExecute = true;
pi.Verb = "open";
System.Diagnostics.Process.Start(pi);
}

---------
- G Himangi, Sky Software http://www.ssware.com
Shell MegaPack : GUI Controls For Drop-In Windows Explorer like Shell
Browsing Functionality For Your App (.Net & ActiveX Editions).
EZNamespaceExtensions.Net : Develop namespace extensions rapidly in .Net
EZShellExtensions.Net : Develop all shell extensions,explorer bars and BHOs
rapidly in .Net
---------

"Bill Nguyen" <bi*****************@jaco.comwrote in message
news:uB**************@TK2MSFTNGP02.phx.gbl...
>I would like to open for view only or editing different file types in
VB.NEt.
For example:
PDF
BMP
JPEG
GIF
DOC
etc...

Can use file association in Windows OS or to detect necessary application
based on file extension then invoke it.

Thanks

Bill


May 5 '07 #2

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

Similar topics

1
by: Donnie | last post by:
Hello I'm receiving the following error message when I try to view an aspx page in Design view "Could not open in Design View. Quote values differently inside a '<%... "value" ... %>' block ...
10
by: eSolTec, Inc. 501(c)(3) | last post by:
Thank you in advance for any and all assistance. I'm building a technician's tool and I'm trying to create a Jump Panel of buttons to the Windows System32 folder to open files programmatically. I...
2
by: johnlim20088 | last post by:
Hi Someone please help me string typ; if (e.Row.RowType == DataControlRowType.DataRow) { typ = e.Row.Cells.Text;
0
by: Axeman | last post by:
I have an ASP.NET webapp that needs to view and print several different image formats (JPG, TIFF, BMP, etc.). In addition, it also needs to view/print PDF files. I have successfully implemented the...
8
by: Arno R | last post by:
Hi all. When I need to search for pictures, I always have too choose thumbnail-view manually. Is it possible to open the common dialog in thumbnail-view programmatically? Example ?? At the...
1
by: barry.zhao | last post by:
Hi, I have a python program that constantly updates an excel spreadsheet. I would like to be able to view its updates while using excel to edit other excel files. Below are the test codes I...
0
by: wfsmith | last post by:
I have a page with a MultiView control and 6 Views. Each view has a User control that contains various form controls (dropdowns, textboxes and CascadingDropDown Ajax.Net controls). When the...
2
by: orangemonkey | last post by:
Hey. Naive question, how do you open and edit java files? I use NetBeans IDE 6.01. Let's say I save a hello world program, I try to double click it, use the open with Netbeans, notepad, anything...
1
by: rogerford | last post by:
I have a grid which i bind with values from Database. I have events to edit and update the grid. I am not using SqlDatasource to connect to DB. Rather i am doing the updating of the grid...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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.