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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Windows 11 - any problems noted? 2

GriffMG

Programmer
Mar 4, 2002
6,308
FR
I just upgraded my lappie to W11, thinking that customers will be pushed to do so soon - as with W10, and not wanting any unforeseen issues to bite me!

I cannot see anything life threatening... any gotchas I should be looking for? like the fix for general fields required in W10?
 
DEVNAMES? What are you talking about. We were discussing DocumentProperties and PrintDlgEx DEVMODE struct, which has the binary form of printer settings, specific to the printer, especially in DocumentProperties. You can always determine the name a printer gets in its driver installation and printer setup and then you can change varchar(50), it's not set in stone, is it?

All ingredients are on the table and have been dicussed 2-3 times each and you still seem to forget most of what's already been thought of.

To just talk about the major ideea: DEVMODE as binary priter settings you can store for each individual report, it's combinable with expr1 set to something like COPIES=3, if necessary, but all in all you can g without and expr1 settings, especially not very specific ones.

Besides all that, even the DEVMODE struct can be used in nondestructuve ways. For example, https://learn.microsoft.com/en-us/t...32/modify-printer-settings-documentproperties shows how to merge DEVMODE with current settings, too. And you can store the current DEVMODE struct and reset it after your print job.
 
Last edited:
Sorry, DEVNAMES struct is only relevant when you parse the fields of the DEVMODE structure. It's not relevant when you use the DEVMODE structure as it is.

All ingredients are on the table and have been dicussed 2-3 times each and you still seem to forget most of what's already been thought of.

Sometimes it's not enough to have all the ingredients to cook a tasty meal :) It might sound easy but working with these APIs gave me a headache back then.

If you show me in code how to open the DocumentProperties or PrintDlgEx with a saved DEVMODE structure from a blob field and receive the changed DEVMODE structure after the menu closes to store it in a blob field again and you'll have me converted :)

Thanks,
Manni
 
Manni, you just need to follow the links, there are code examples to read and set the DEVMODE struct. It's simply a string of some bytes that you store into a blob just as you store it into a memo with insert into table (blobfieldname) values (devmodebuffer) or with append and replace or how ever you like. I refuse to repeat what's already there.

Also for any API function refer to https://github.com/VFPX/Win32API/blob/master/functions_alphabetical.md and related samples.

mJindrova, the API functions give you the necessary sizes of DEVMODE, I think it also will vary depending on printers, however it's easy to get it.
 

Part and Inventory Search

Sponsor

Back
Top