Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Type to Printer... crashes
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00931903
Message ID:
00932177
Vues:
23
Hello Wayne

Thank you for your reply.


>I don't see where you are selecting a printer - sounds to me like the default printer on the machine is either not set, or the driver is corrupt.

the clause "prompt" displayes a windows printer selection where the user can choose a printer or cancel.


>a)Update the driver for the default printer, or b)don't allow them to print until they select a printer.


after further testing i found, that if i issue the command from the command window, i have no problems when canceling. only when doing this from the form which has the button (with the code below) on it, it crashes on canceling.

i found that issuing this from the command window, when canceling in the printer selection, the text prints to the vfp desktop, where in my app this does not happens (which is the correct behavior). maybe this has to do something with it.

or, i am thinking that something on the form is messed up and does not cause a problem normaly, only when using the code below, but i have no idea what i could look for (the form is quite complex and has many calls to different classes).

any further ideas are greatly appreaciated!



>
>
>>Hello everybody.
>>
>>i have different logs in my app which users can display and print. they are normal asci text files. through a command button i issue the following comands:
>>LOCAL ;
>>	OldConsole, ;
>>	SetHeading, ;
>>	FileName
>>
>>OldConsole = SET('console')
>>SetHeading = SET('HEADINGS')
>>SET CONSOLE OFF
>>SET HEADING OFF
>>
>>FileName = THIS.PARENT.DisplayFile
>>
>>TYPE (FileName) AUTO WRAP TO PRINTER PROMPT
>>
>>SET CONSOLE &OldConsole
>>SET HEADING &SetHeading
>>
>>if the user chooses to select a printer and prints everything is ok, but if the user cancels on the printer selection, vfp crashes with a C0000005 error.
>>
>>This is in vfp6 sp5 winxp and a bunch of network printers.
>>
>>anyone has an idea if this is a bug or any workaround?
>>
>>thanks for all your help in advance!
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform