Board index » delphi » D3 pro Printer Dialogs
Kai Inge Buseth
![]() Delphi Developer |
Tue, 15 Mar 2005 01:01:45 GMT
|
Kai Inge Buseth
![]() Delphi Developer |
Tue, 15 Mar 2005 01:01:45 GMT
D3 pro Printer Dialogs
Hello,
I made a small program for a Win95 pc, where I used a PrinterSetUpDialog and The program is developed on a Win98 PC. Any ideas of what is going on? Then I would be most grateful. The list should be written before the end of :) |
Kai Inge Buset
![]() Delphi Developer |
Tue, 15 Mar 2005 01:07:33 GMT
Re:D3 pro Printer DialogsForgot to mention that excel and other non-Delphi programs selects the :) Quote |
Aaron Mile
![]() Delphi Developer |
Tue, 15 Mar 2005 11:16:09 GMT
Re:D3 pro Printer DialogsJust using the Component doesn't set it to the default printer that the program will use. Can you please forward the code you use so we can see where you are going Thanks Aaron "Kai Inge Buseth" <kibus...@online.no> wrote in message Quote
|
Kai Inge Buset
![]() Delphi Developer |
Wed, 16 Mar 2005 05:29:58 GMT
Re:D3 pro Printer DialogsThe code goes like this: {psetupd : TPrinterSetupDialog} procedure Ttliste.sbF12Click(Sender: TObject); I would believe that the PrinterSetupDialog deals with whatever it takes to Any suggestions would be appreciated. :) Aaron Miles <supp...@qbd.net.au> skrev i Quote> Just using the Component doesn't set it to the default printer that the |
peter
![]() Delphi Developer |
Wed, 16 Mar 2005 10:38:01 GMT
Re:D3 pro Printer Dialogs"Kai Inge Buseth" <kibus...@online.no> wrote in message Quote> Hello, takes the printer name, which you get from the PrintDialog, and sets the index properly. I use a repeat .. until loop and a try ..except as I found no way to detemine the number of available printers. You need to includes the Printers unit. function SetPrinterIndex( const prnName : string ) : integer; PR |
peter
![]() Delphi Developer |
Wed, 16 Mar 2005 22:11:49 GMT
Re:D3 pro Printer DialogsQuote"peterr" <pet...@freemail.absa.co.za> wrote in message Quote> function SetPrinterIndex( const prnName : string ) : integer; Printer.PrinterIndex := result; To expand on the whole thing. The PrintDialog box PR |
And
![]() Delphi Developer |
Thu, 17 Mar 2005 07:57:51 GMT
Re:D3 pro Printer DialogsOn Fri, 27 Sep 2002 21:29:58 GMT, "Kai Inge Buseth" <kibus...@online.no> wrote: Quote>The code goes like this: The "cb" prefix in my code indicates a "combo box" and "lbl" is just a label. function TfrmSetup.GetDefaultPrinter : string; procedure TfrmSetup.SetDefaultPrinter(NewDefPrinter : string); procedure TfrmSetup.btnSetPrintClick(Sender: TObject); Andy |
Kai Inge Buset
![]() Delphi Developer |
Fri, 18 Mar 2005 05:13:31 GMT
Re:D3 pro Printer DialogsThank you for answering me. I have some difficulties to understand the connection between your code and the TPrinterSetupDialog. Where do I put your code, and how does it intercept the closeup and change of the combobox in the Dialog Form. Where do TPrinterSetupDialog store it's list values? It has rather few properties. I have tried with prnName := TPrinterSetupDialog.Name; but to no avail. prnIndex was also a undecleared identifier, am I supposed to prnIndex := result; somewhere? How do I connect the text in the combobox to prnName when it's changed since there do not seem to be a oncloseup or onchange event available? I understand the most of your code, but not where to put it and how to connect it to the Dialog's combobox changes. :) peterr <pet...@freemail.absa.co.za> skrev i Quote
|
And
![]() Delphi Developer |
Sat, 19 Mar 2005 02:47:15 GMT
Re:D3 pro Printer DialogsOn Sun, 29 Sep 2002 21:13:31 GMT, "Kai Inge Buseth" <kibus...@online.no> wrote: Quote>Thank you for answering me. Quote>I have some difficulties to understand the connection between your code and similar problem (as I understood your post). Quote>Where do I put your code, and how does it intercept the closeup and change required. Keep in mind that the code I quoted you is lifted directly from one of my apps, so some of the stuff won't seem very relevant. It isn't commented because I assumed (there's that word again <g>) that the function and procedures were self explanatory. Messing around with the printer dialog isn't one of my forte's. My signature line, speaks the Andy |
Kai Inge Buset
![]() Delphi Developer |
Sat, 19 Mar 2005 05:30:57 GMT
Re:D3 pro Printer DialogsThank you, I will try it out. It takes some time to try out the different solutions So now I will go on to explore your code to see if it can make the Win 95 :) Andy <ptra...@nospamat.rogers.com> skrev i Quote> On Sun, 29 Sep 2002 21:13:31 GMT, "Kai Inge Buseth" <kibus...@online.no> Quote> similar problem (as I understood your post). Quote> of the stuff won't seem very relevant. It isn't commented because I Quote> again <g>) that the function and procedures were self explanatory. Quote> truth. ;-) |
peter
![]() Delphi Developer |
Sat, 19 Mar 2005 10:54:13 GMT
Re:D3 pro Printer Dialogs"Kai Inge Buseth" <kibus...@online.no> wrote in message Quote> Thank you for answering me. the printer setup to hold the correct values, such as paper size, orientation, etc. For preview selection, etc, I have my own form. TPrinterSetupDialog is rather the pits. In the Form.Create() event insert Select the printer from the list. Use the function provided to set Quote> Where do I put your code, and how does it intercept the closeup and change Quote> How do I connect the text in the combobox to prnName when it's changed depending on the OK or Close button. All other stuff should be in the properties. As I don't use it I am a bit vague about this. Quote> I understand the most of your code, but not where to put it and how to take a day or two until I get to it. PR Quote> peterr <pet...@freemail.absa.co.za> skrev i |
Kai Inge Buset
![]() Delphi Developer |
Sun, 20 Mar 2005 13:15:38 GMT
Re:D3 pro Printer DialogsThanks, when you explained that the code has no connection with the native :) peterr <pet...@freemail.absa.co.za> skrev i Quote
|