Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Copy that
Message
From
19/01/2016 19:15:05
 
 
To
19/01/2016 17:14:29
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows 10
Network:
Windows Server 2016
Database:
Visual FoxPro
Application:
Desktop
Miscellaneous
Thread ID:
01629953
Message ID:
01629965
Views:
265
Likes (1)
you are right there is no flag to enable/disable an option as shown with windows standard showPrinter.
I think VFP dialogs are older than windows recent dialogs.
All the windows dialogs (showOpen,ShowSave,shofont,ShowPrinter mainly) can be translated easily to vfp as
an object activex "mscomdlg.commondialog").it can created as com object (createObject,newObject) or embedded on a form (in design mode).
this control is shipped with vfp (microsoft common dialog control 6.0 (SP3)).see in menu/tools/options/controls

this is a snippet of code where you see can enabled/disable options in the printer dialog
#DEFINE cdlPDAllPages    0    && Sets or returns state of All Pages option button.
#DEFINE cdlPDCollate	16	&& Sets or returns state of Collate check box.
#DEFINE cdlPDDisablePrintToFile	524288	&& Disables the Print to File check box.
#DEFINE cdlPDHidePrintToFile	1048576	&& The Print to File check box is not displayed.
#DEFINE cdlPDNoPageNums	8	&& Sets or returns the state of the Pages option button
#DEFINE cdlPDNoSelection	4	&& Disables the Selection option button.
#DEFINE cdlPDNoWarning	128	&& Prevents a warning message when there is no default printer.
#DEFINE cdlPDPageNums	2	&& Sets or returns the state of the Pages option button.
#DEFINE cdlPDPrintSetup	64	&& Displays the Print Setup dialog box rather than the Print dialog box.
#DEFINE cdlPDPrintToFile	32	&& Sets or returns the state of the Print to File check box.
#DEFINE cdlPDReturnDC	256	&& Returns a device context for the printer selection.
#DEFINE cdlPDReturnDefault	1024	&& Returns default printer name.
#DEFINE cdlPDReturnIC	512	&& Returns an information context for the printer selection.
#DEFINE cdlPDSelection	1	&& Sets or returns the state of the Selection option button.

 ComDlg = Newobject("mscomdlg.commondialog")
with ComDlg
   .PrinterDefault = .t.
   .CancelError =.t.
   * Set flags ( cdl* constants can concatenate flags as operator +:"or"))
   .Flags = cdlPDReturnDC + cdlPDAllPages
  .copies=10   &&set here the number of copies(can see it when the dialog is fired below)
    try
.ShowPrinter()
catch
endtry
endwith
you can see more on dialogs in my blog in this link:
http://yousfi.over-blog.com/2016/01/working-with-common-dialogs-part2.html (see code *5*)
http://yousfi.over-blog.com/2016/01/working-with-common-dialogs-part1.html

can see the dialog constants in this msdn link
https://msdn.microsoft.com/en-us/library/aa259317%28v=vs.60%29.aspx

Note:* visual foxpro have the native simplified dialogbox as
GetPrinter()
Sys(1037)
and dont answer to your question.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform