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

need help in printing

i want to print files in vb.net with the ability to let users choose if they
want it "colored" or only "black and white"(grayscale). how can i make a file
print in only "black and white"?

ill illustrate an example to explain my question better:
a user opens a word file(.doc) and the file has colored text and images, then
the user has 2 options, to print in colored or black, so if they choose:
a.) colored - it will only print normally
b.) black - it needs to alter the settings of the printer to make it
grayscale, so even if the file has colored text and images, it will only be
printed in black and white.

so my question is, how do i do letter b? can someone post a code to do this?

thanks!!

--
Message posted via DotNetMonster.com
http://www.dotnetmonster.com/Uwe/For...b-net/200801/1

Jan 13 '08 #1
3 1334
"jabslim via DotNetMonster.com" <u40064@uweschrieb:
>i use dsoframer control to open the .doc files... and i use this code below
to print normally:

Dim print_file As New ProcessStartInfo
print_file.UseShellExecute = True
print_file.Verb = "print"
print_file.WindowStyle = ProcessWindowStyle.Hidden
print_file.FileName = file_doc '----file_doc is the one the user
opened (openfiledialog1.filename)
Process.Start(print_file)

i didnt quite get the code you posted. im sorry because im just a little
new
here in vb.net and i still dont know all the things about it.

how do you add the codes to make it print in grayscale? thanks!
You cannot use the code I posted together with the code above. You'd have
to follow the guidelines in the "Automating Using Managed Code" section of
this article:

<URL:http://msdn2.microsoft.com/en-us/library/76d2d007.aspx>

Note that this will only work if Word is installed on the target machine.

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://dotnet.mvps.org/dotnet/faqs/>

Jan 14 '08 #2
oh... may i know how to use your code above to print a file in grayscale?
can you provide a sample code? thanks!

Herfried K. Wagner [MVP] wrote:
>"jabslim via DotNetMonster.com" <u40064@uweschrieb:
>>i use dsoframer control to open the .doc files... and i use this code below
to print normally:
[quoted text clipped - 12 lines]
>>
how do you add the codes to make it print in grayscale? thanks!

You cannot use the code I posted together with the code above. You'd have
to follow the guidelines in the "Automating Using Managed Code" section of
this article:

<URL:http://msdn2.microsoft.com/en-us/library/76d2d007.aspx>

Note that this will only work if Word is installed on the target machine.
--
Message posted via DotNetMonster.com
http://www.dotnetmonster.com/Uwe/For...b-net/200801/1

Jan 14 '08 #3
can someone please help me with how to print files in grayscale or black and
white mode?
bacause i still haven't figured out how to do it and i really need it for my
project.
can anyone please post a code on how to print in grayscale? will really
appreciate it very much! thanks!

--
Message posted via http://www.dotnetmonster.com

Jan 17 '08 #4

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

Similar topics

9
by: Jody Gelowitz | last post by:
I am trying to find the definition of "Safe Printing" and cannot find out exactly what this entitles. The reason is that I am trying to print contents from a single textbox to no avail using the...
4
by: Arif | last post by:
I C# code prints very slow as compared to a third party barcode printing software. That software prints approximately 10 labels in 2 seconds while my C# code prints 10 labels in 5 to 6 seconds. And...
0
by: Nigel | last post by:
I successfully create a .NET Component (Visual Basic .NET) that would print, unfortunately when used within a web browser it appears that .NET security doesn't allow you to run code that interacts...
1
by: Mika M | last post by:
Hi! I have some problems with setting PrintDocument margins using PageSetupDialog. Here some code to explain my problem... First PrintDocument declaring this way... Private pd As...
24
by: Rhino | last post by:
I am dabbling with print CSS for the first time and I need some guidance. The web pages on my site look fine - to my untrained eye - when displayed on the monitor in any of the standard browsers....
2
by: Sukh | last post by:
Hi I am stuck with a problem Can anyone help me out from this... I am printing a report on pre-printed continue paper using dot-matrix printer using vb.net. Data is printing on all the...
6
by: Siv | last post by:
Hi, I am getting into printing with VB.NET 2005 and want to implement the usual capability that a user can select a selection of pages. I have a report that is generated by my application that if...
10
by: preethamkumark | last post by:
- The program first creates a shared memory buffer containing an array of 20 integers. - Each slot of the buffer can have either 0 or 1, where 0 represents an empty slot, and 1 represents an...
8
by: Neo Geshel | last post by:
Greetings. BACKGROUND: My sites are pure XHTML 1.1 with CSS 2.1 for markup. My pages are delivered as application/xhtml+xml for all non-MS web clients, and as text/xml for all MS web...
1
by: sandyt57 | last post by:
I do Tech Support but do not know Visual Basic programming. In order to resolve a work process issue for one of our depts I need a macro that can do the following. I tried to create a macro in Word...
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...
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.