Information générale
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
>Hi Gunnar.
>
>We (spanish vfp newsgroups) can test your code if you like to. In latin america there's a bunch of people using a great number of brands and models of dot-matrix printers.
Hello Esparta
Sure, sounds like a good idea, maybe we could 'refine' the logic. see, all this code is doing, is to see if the printer is capable of printing more then 16 colors AND if the printer is capable of printing True Type Fonts as graphic (that doesn't neccesarly mean that it will print them as a graphic!).
so, in my opinion this is not a SURE method of detecting a dot-matrix printer (not sure if there is any), but it will 'help' in providing the user with info, and, since i don't think its a fail-safe function, i've provided the user in my GUI with a way to overwrite this computer choice.
when you look at the help for the 2 API's (GetDeviceCaps() and DeviceCapabilities()), you'll see that there are more printer infos one can find out. maybe an additional or replacment data would be more beneficial - more precise for a decission?! - i don't know.
also, i found that the printer/driver must have been installed on the workstation which is calling this function. additionally i believe that those 2 API's are not realy 'asking' the printer what it's capable off, but rather retrieve this information from the driver itself - that means if the user has installed a wrong driver, wrong data might come accross, and therefor a wrong decission might be made. in my test grounds here i have about 35 workstations and about 15 different printers. lasers and ink-jets are installed with their correct drivers, but dot-matrics are all installed with just the 'generic/text only' driver from windows.
if you do try/test it, i would be very interested in your findings.
Précédent
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement