I'm not certain when but in Windows 11 the printer dialogue for 32 bits apps changed ...
If you leave the new dialogue active (you can change registry settings to force the old one) then anything you do with set printer before printing a report with printer prompt brings up the dialogue but it just displays the default printer, is forcing the old dialogue the only solution for vfp apps or is there a way to get vfp to work nicely with it?
TIA
Chris.
--- StripMime Report -- processed MIME parts --- multipart/alternative text/plain (text body -- kept) text/html ---
Not following Chris - do you mean GetPrinter() ?
Hi Alan
No sorry, I mean the dialogue that appears when you do report form to printer prompt.
-----Original Message----- From: ProfoxTech profoxtech-bounces@leafe.com On Behalf Of Alan Bourke Sent: Thursday, December 21, 2023 2:14 PM To: profoxtech@leafe.com Subject: Re: Printer Dialogue
Not following Chris - do you mean GetPrinter() ?
-- Alan Bourke alanpbourke (at) fastmail (dot) fm
[excessive quoting removed by server]
It's the SYS(1037) dialogue.
AFAIK, the VFPA version has that bug (and many others) fixed. http://www.baiyujia.com/vfpadvanced/f_vfpa_about.asp
If that's not an option for you, you could write your own function:
FUNCTION Sys1037 SYS(1500,'_mfi_sysprint','_mfile') RETURN
You now only need to find a way to hook into the toolbarbutton of that REPORT toolbar. That should be possible with the sourcecode provided at VFPX. https://github.com/VFPX/ReportingApps
BTW: have you checked if maybe Doug Hennig has already fixed that there?
wOOdy
-----Ursprüngliche Nachricht----- Von: ProFox profox-bounces@leafe.com Im Auftrag von Alan Bourke Gesendet: Donnerstag, 21. Dezember 2023 15:14 An: profoxtech@leafe.com Betreff: Re: Printer Dialogue
Not following Chris - do you mean GetPrinter() ?
-- Alan Bourke alanpbourke (at) fastmail (dot) fm
[excessive quoting removed by server]
BTW: To get the oldfashioned printer dialogue for that SYS(1500....) stuff, you need to do this once for every user:
RUN "REG add HKCU\Software\Microsoft\Print\UnifiedPrintDialog /v PreferLegacyPrintDialog /t REG_DWORD /f /d 1"
Change that trailing "1" to "0" for restoring the new print dialogue
Instead of that onpopping dos-window, real PROs of course would use that nifty registry class of VFP :=) But that one can't read/write values other than strings, and we need numeric.
Therefore this one would be more modern than a CMD window flashing by:
oWSH = CreateObject("WScript.Shell") oWsh.RegWrite("HKCU\Software\Microsoft\Print\UnifiedPrintDialog\PreferLegacy PrintDialog", 1, "REG_DWORD")
to check for that Value use nResult = oWSH.RegRead("HKCU\Software\Microsoft\Print\UnifiedPrintDialog\PreferLegacyP rintDialog)
wOOdy