Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Modifying Page Setup/SYS(1037) dialogue

Status
Not open for further replies.

StewartUK

Programmer
Feb 19, 2001
860
GB
Does anyone know of a way of modifying the standard VFP page setup dialogue form - adding or removing controls etc, or perhaps there is a custom dialogue form somewhere?

Thanks

Stewart
 
Stewart

Not your answer, but:-

KEYBOARD[{CTRL+P}]

will give you a different dialogue with the emphasis on what you can print.

What are you trying to add/remove?

Chris :)
 
Create a button - Caption = Set Printer
Add in the click event
SYS(1037)
Use this button along with your report buttons.
I suggest use it in the navigation buttons next to List button or suitably. This will provide facility to set the printer by user.

ramani :)
(Subramanian.G)
FoxAcc
ramani_g@yahoo.com
 
Sorry I think I have misunderstood your question. You are asking about modifying the various options provided by SYS(1037). I shall check it and get back as I dont remeber to have done this modification. But it must be possible. ramani :)
(Subramanian.G)
FoxAcc
ramani_g@yahoo.com
 
Chris,

What I want to do at the moment is give users the opportunity to choose a printer and then set it as their default for my program. Thinking about it, I could display a messagebox after the user has closed the Page Setup dialogue, asking if they want to set this printer as their default, but having a button on the dialogue form would be much nicer.

I guess I'd need to use a command button as SYS(1037) doesn't return anything.

Bit of a long shot I guess, but many commercial programs come up with variations, so my thinking is it must be possible to adapt.

Stewart
 
Oh then the suggestion is perfectly ok.
I repeat again...

Create a button - Caption = Set Printer
Add in the click event
SYS(1037)
Use this button along with your report buttons.
I suggest use it in the navigation buttons next to List button or suitably. This will provide facility to set the printer by user

ramani :)
(Subramanian.G)
FoxAcc
ramani_g@yahoo.com
 
Stewart

Have you considered using APRINTER() to create a table of available printers, deleting the printers from the table that you don't want the user to access, such as fax drivers, file etc?

The following runs in a MAIN.prg in an application and would need some mods.

CREA TABLE tables\printers (printer C(40),port C(20),expr M)
APRINTERS(laPrinters)
IF VARTYPE(laPrinters) # "U" && If a printer exists
[tab]ASORT(laPrinters)
[tab]APPEND FROM ARRAY laPrinters
[tab]DELETE FOR PRINTERS.port = [FILE:]
[tab]DELETE FOR PRINTERS.port = [Share]

[tab]LOCATE FOR SUBSTR(PRINTERS.port,1,3) = [COM]
[tab]IF FOUND()
[tab][tab]REPLACE USER.fax_name WITH PRINTERS.printer
[tab][tab]DELETE
[tab]ELSE
[tab][tab]REPLACE USER.fax_name WITH []
[tab]ENDIF
[tab]RELEASE laPrinters
ENDIF

You could then create a dialog/form which would achieve what you are after and you would know they have selected a "legal" printer, and call the selected printer with SET PRINTER TO NAME etc.

Chris :)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top