473,399 Members | 3,401 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,399 software developers and data experts.

Invoking Print Functionality

Gos
Hi,

I have a grid which displays a list of files. The files can be of
any types. I also have a button on the form called "Print". If the
user has selected a word document and .bmp file, is there a way I can
invoke the print function of Word application for word document and
print function of Paint for .bmp file? I want to do the same thing for
any kind of file as long as the file has an application associated to
it.

I would appreciate any help.

Thank you
Gos
Nov 20 '05 #1
2 2041
Look at ProcessStartInfo class and Process.Start method.
Allows you to execute a program with command line arguments. You will have
to figure out the commands for each program you want to print a document
for. This can be done in Windows' File Types.

"Gos" <er***********@yahoo.com> wrote in message
news:a3**************************@posting.google.c om...
Hi,

I have a grid which displays a list of files. The files can be of
any types. I also have a button on the form called "Print". If the
user has selected a word document and .bmp file, is there a way I can
invoke the print function of Word application for word document and
print function of Paint for .bmp file? I want to do the same thing for
any kind of file as long as the file has an application associated to
it.

I would appreciate any help.

Thank you
Gos

Nov 20 '05 #2
er***********@yahoo.com (Gos) scripsit:
I have a grid which displays a list of files. The files can be of
any types. I also have a button on the form called "Print". If the
user has selected a word document and .bmp file, is there a way I can
invoke the print function of Word application for word document and
print function of Paint for .bmp file? I want to do the same thing for
any kind of file as long as the file has an application associated to
it.


\\\
Dim p As New System.Diagnostics.ProcessStartInfo()
p.Verb = "print"
p.WindowStyle = ProcessWindowStyle.Hidden
p.FileName = "C:\filename.htm"
p.UseShellExecute = True
System.Diagnostics.Process.Start(p)
///

--
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

6
by: Dennis Allen | last post by:
Hi. On one particular web page I want to offer the user a print button. Question. How do I create one? Something compatible with most browsers would be nice. Appreciate any advice...Dennis
4
by: Wendy Elizabeth | last post by:
I would like to know how to print a crystal report that was generated in the ..NET framework using a Visual Basic.NET web application and/or a Visual basic.NET windows application. When crystal...
25
by: MuZZy | last post by:
Hi, I'm currently rewriting some functionality which was using multithredaing for retrieving datasets from database and updating a grid control. I found that the grids (Infragistics UltraGrid,...
69
by: Edward K Ream | last post by:
The pros and cons of making 'print' a function in Python 3.x are well discussed at: http://mail.python.org/pipermail/python-dev/2005-September/056154.html Alas, it appears that the effect of...
1
by: ajaykhedekar | last post by:
I am Showing Mulitple MSRS Reports on Single ASP.Net WEB Page using Mulitple ReportViewer Controls. If User wants to Print the Reports, then user has to click Print button provided by ReportViewer...
1
by: rameshsah | last post by:
I have following procedures on Oracle database sever, Procedure_one (Number, String) Procedure_one (Number, String, Boolean) Procedure_one (Number, String, Boolean, String) It appears that I...
7
by: samslists | last post by:
Am I the only one that thinks this would be useful? :) I'd really like to be able to use python 3.0's print statement in 2.x. Is this at least being considered as an option for 2.6? It seems...
1
by: eeriehunk | last post by:
Hi All, I wrote a procedure to clear all my text fields and disable all buttons in my form. And I call this procedure in a button (insert button). when I presses the insert button, after all my...
1
by: vijaykrishna | last post by:
Hi, I am developing the Text editor using c#.net I want to implement print functionality and the printed pages should be WYSIWYG format In my application I am using rich textbox control...
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: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
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
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...
0
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...

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.