Print the content of an embedded IE html control: Difference between revisions

From DataFlex Wiki
Jump to navigationJump to search
m (Added to the How To category)
m (Added to Tutorials category)
 
Line 24: Line 24:


[[Category:How To]]
[[Category:How To]]
[[Category:Tutorials]]

Latest revision as of 11:45, 25 March 2020

Embedding the IE control

Since VDF supports ActiveX components, one of the standard examples is a demonstration of how you could embed the Mictrosoft Internet Explorer component in your application. In VDF12.1 see the "Specialized Components" workspace and check out the Com ActiveX Samples. Since the component is capable of displaying a lot more as just html, it has been used to display - for example - images (or embedded Word documents, Acrobat documents.. you get the idea)

Printing

It looks as if printing is missing from the features. One way would be trying to mimic key presses, something you really should stay away from as much as you can. The better solution was provided by Oliver:

  Procedure DoPrintImage
    
    // This message prints directly to the default printer;
    // Send ComExecWB OLEOLECMDID_PRINT OLEOLECMDEXECOPT_DONTPROMPTUSER 0 0
    
    // This message presents the printer dialog before printing;
    Send ComExecWB OLEOLECMDID_PRINT OLEOLECMDEXECOPT_PROMPTUSER 0 0
  End_Procedure // DoPrintImage

External Links

INFO: Uniformity of images displayed in VDF applications (JPEG)