forum.vdsworld.com Forum Index forum.vdsworld.com
Visit VDSWORLD.com
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


IE Print Templates & Gadget X

 
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> General Help
View previous topic :: View next topic  
Author Message
henrywood
Contributor
Contributor


Joined: 21 Sep 2004
Posts: 66
Location: Copenhagen, Denmark

PostPosted: Sun May 06, 2007 2:55 pm    Post subject: IE Print Templates & Gadget X Reply with quote

Since I decided to buy a copy of Gadget X, I was wondering if the printing templates functionality would be accessible through Gadget X


Print Templates are described here:

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/IETechCol/dnwebgen/beyondprintpreview.asp

The way to go that I imagine:

1. Write a print template
2. Using Gadget X instantiate a WebBrowser Control, and telling it of the print template upon instantiation


The above article seems to indicate that you need C++ for using this print template functionality, but if the correct parameters can be passed to the WebBrowser control, I imagine that this would be possible ?

Anyone with thoughts on this ?


Henrik
Back to top
View user's profile Send private message Send e-mail
vdsalchemist
Admin Team


Joined: 23 Oct 2001
Posts: 1448
Location: Florida, USA

PostPosted: Sun May 06, 2007 3:15 pm    Post subject: Reply with quote

Henrik,
I looked at this page and yes this is possible with GadgetX. I have an demo in the GadgetX package called surfxbrowser-gadgetx.dsc that shows how to tell the Browser control to print and too do a print preview. You would only need to pass the command called Ole Command the path to the template you would like to use.

Code:


:Print PreviewMENU
  # Call IE's Print Preview Command
  #Ole CallMethod,SHDocVw,"ExecWB(^d,^d,^p,^p)",OLECMDID_PRINTPREVIEW,OLECMDEXECOPT_PROMPTUSER,NULL,NULL
  SetVar vaTemplatePath,%%TemplatePath,^B
  Ole Command,Document,Exec,OLECMDID_PRINTPREVIEW,OLECMDEXECOPT_PROMPTUSER,vaTemplatePath,NULL
goto evloop

:PrintMENU
  # Call IE's Print Command
  # Ole CallMethod,SHDocVw,"ExecWB(^d,^d,^p,^p)",OLECMDID_PRINT,OLECMDEXECOPT_PROMPTUSER,NULL,NULL
  SetVar vaTemplatePath,%%TemplatePath,^B
  Ole Command,Document,Exec,OLECMDID_PRINT,OLECMDEXECOPT_PROMPTUSER,vaTemplatePath,NULL
goto EVLOOP


_________________
Home of

Give VDS a new purpose!
Back to top
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger MSN Messenger
henrywood
Contributor
Contributor


Joined: 21 Sep 2004
Posts: 66
Location: Copenhagen, Denmark

PostPosted: Sun May 06, 2007 3:43 pm    Post subject: Reply with quote

That looks easy enough.

Thank you for your help !


Henrik
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> General Help All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum

Twitter@vdsworld       RSS

Powered by phpBB © 2001, 2005 phpBB Group