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?
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.
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
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.
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
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.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.