Solved

convert vb printer code to c#

Posted on 2004-10-20
8
281 Views
Last Modified: 2008-02-01
0
Comment
Question by:tomvergote
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 5
  • 3
8 Comments
 
LVL 8

Author Comment

by:tomvergote
ID: 12357075
nevermind got it
0
 
LVL 7

Accepted Solution

by:
God_Ares earned 500 total points
ID: 12357438
post it here then,.. so others may find it...
0
 
LVL 8

Author Comment

by:tomvergote
ID: 12360805
I went about it in a totally different way, and the solution is worthy of an article on it's own.
Posting the solution  would mean posting my whole form, and the code is my customers property so i'm not sure I'm supposed to post it in the pub domain ;)
0
Salesforce Made Easy to Use

On-screen guidance at the moment of need enables you & your employees to focus on the core, you can now boost your adoption rates swiftly and simply with one easy tool.

 
LVL 8

Author Comment

by:tomvergote
ID: 12360882
I can add this:
There is a mapping in code between the win32 paper sources and the .NET papersourcekind so what i'm doing now is something like
- fill tray dropdown from .NET (the papersourcekind stuff)
- when the user clicks print, I use slightly modified code from here (I added a function to retrieve the orginal settings so i can restore them afterwards, if you look at the set function you should be able to make a get function)
http://www.codeproject.com/dotnet/NET_Printer_Library.asp
With the function from that article I set the SYSTEM printer settings and change the default tray.
- when printing is finished I restore the original system settings.

I realise this is tricky because the settings might not be restored if the program is killed or crashed, but the customer would rather have it that way than no way to select the tray.
0
 
LVL 8

Author Comment

by:tomvergote
ID: 12360902
I'm giving the points to god_ares because he has a good point and contributed to some sort of solution being posted
0
 
LVL 7

Expert Comment

by:God_Ares
ID: 12361242
well this the second easiest question I ever answered


first : http://www.experts-exchange.com/Programming/Programming_Languages/Delphi/Q_20238436.html
but i got a grade A for it ;)


when i read:
> went about it in a totally different way, and the solution is worthy of an article on it's own.
>Posting the solution  would mean posting my whole form, and the code is my customers property so i'm not sure I'm supposed to post it in the pub domain ;)
it would be fine with me if you wanted to refund,... well thanks a lot,.. on to c# #1,

regards

Floris Briolas
0
 
LVL 8

Author Comment

by:tomvergote
ID: 12361395
grade A would've been a bit much :)
0
 
LVL 7

Expert Comment

by:God_Ares
ID: 12361479
well not complaining here,.. just,.. so easy...
0

Featured Post

SharePoint Admin?

Enable Your Employees To Focus On The Core With Intuitive Onscreen Guidance That is With You At The Moment of Need.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction This article series is supposed to shed some light on the use of IDisposable and objects that inherit from it. In essence, a more apt title for this article would be: using (IDisposable) {}. I’m just not sure how many people would ge…
This article introduced a TextBox that supports transparent background.   Introduction TextBox is the most widely used control component in GUI design. Most GUI controls do not support transparent background and more or less do not have the…
In this video, viewers are given an introduction to using the Windows 10 Snipping Tool, how to quickly locate it when it's needed and also how make it always available with a single click of a mouse button, by pinning it to the Desktop Task Bar. Int…
NetCrunch network monitor is a highly extensive platform for network monitoring and alert generation. In this video you'll see a live demo of NetCrunch with most notable features explained in a walk-through manner. You'll also get to know the philos…

615 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question