I’ve found many ways to make the TWebBrowser show a modeless print dialog box, but how do I make it show a modal one? I would like to print an html page, that’s why I need the modal dialog.
I’d really appreciate your ideas on this one.
Thanks!
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Eureka! I solved it.
Here is how:
When you show the modeless print dialog, you can disable the calling Form in Delphi. Then you can use the OnCommandStateChange event to detect when the user Prints or Cancels the Print dialog.
Example code:
I kindly ask you people to test my solution, as I’m not sure of the reliability of this code.
Thanks!