Solved

Web component?

Posted on 2001-09-03
4
139 Views
Last Modified: 2010-07-27
I'm using a TWebBrowser to display a gif image from a web-server.

It seems like it's no way to print the image that are displayed.

Is tehere a good solution for this.. Can I use some other component to print the image or to download it in the temp dir and print it from there....

0
Comment
Question by:hulken
  • 3
4 Comments
 
LVL 6

Expert Comment

by:edey
Comment Utility
have you tried printing like so (quoted from, http://members.home.com/hfournier):

Q: How do I Print?

A: There are a couple of ways to print. The first example works in IE 4.x and up, but you'll have to use the second example in IE 3.x:

var
  vaIn, vaOut: OleVariant;

...

WebBrowser.ControlInterface.ExecWB(OLECMDID_PRINT, OLECMDEXECOPT_DONTPROMPTUSER, vaIn, vaOut);

or

procedure TForm1.PrintIE;
var
  CmdTarget : IOleCommandTarget;
  vaIn, vaOut: OleVariant;
begin
  if WebBrowser1.Document <> nil then
    try
      WebBrowser1.Document.QueryInterface(IOleCommandTarget, CmdTarget);
      if CmdTarget <> nil then
        try
          CmdTarget.Exec( PGuid(nil), OLECMDID_PRINT, OLECMDEXECOPT_DONTPROMPTUSER, vaIn, vaOut);
        finally
          CmdTarget._Release;
        end;
    except
      // Nothing
    end;
end;

Note: If you're not using Delphi 3.02 or higher, you'll have to change

PGuid(nil)
to
PGuid(nil)^
. And you really should upgrade to 3.02, if you're using 3.0 or 3.01.

 

GL
MIke
0
 
LVL 1

Accepted Solution

by:
Moondancer earned 0 total points
Comment Utility
ADMINISTRATION WILL BE CONTACTING YOU SHORTLY.  Moderators Computer101 or Netminder will return to finalize these if they are still open in 14 days.  Experts, please post closing recommendations before that time.

Below are your open questions as of today.  Questions which have been inactive for 21 days or longer are considered to be abandoned and for those, your options are:
1. Accept a Comment As Answer (use the button next to the Expert's name).
2. Close the question if the information was not useful to you, but may help others. You must tell the participants why you wish to do this, and allow for Expert response.  This choice will include a refund to you, and will move this question to our PAQ (Previously Asked Question) database.  If you found information outside this question thread, please add it.
3. Ask Community Support to help split points between participating experts, or just comment here with details and we'll respond with the process.
4. Delete the question (if it has no potential value for others).
   --> Post comments for expert of your intention to delete and why
   --> YOU CANNOT DELETE A QUESTION with comments; special handling by a Moderator is required.

For special handling needs, please post a zero point question in the link below and include the URL (question QID/link) that it regards with details.
http://www.experts-exchange.com/jsp/qList.jsp?ta=commspt
 
Please click this link for Help Desk, Guidelines/Member Agreement and the Question/Answer process.  http://www.experts-exchange.com/jsp/cmtyHelpDesk.jsp

Click you Member Profile to view your question history and please keep them updated. If you are a KnowledgePro user, use the Power Search option to find them.  

Questions which are LOCKED with a Proposed Answer but do not help you, should be rejected with comments added.  When you grade the question less than an A, please comment as to why.  This helps all involved, as well as others who may access this item in the future.  PLEASE DO NOT AWARD POINTS TO ME.

To view your open questions, please click the following link(s) and keep them all current with updates.
http://www.experts-exchange.com/questions/Q.20102072.html
http://www.experts-exchange.com/questions/Q.20103849.html
http://www.experts-exchange.com/questions/Q.20145561.html
http://www.experts-exchange.com/questions/Q.20169449.html
http://www.experts-exchange.com/questions/Q.20169478.html
http://www.experts-exchange.com/questions/Q.20172645.html
http://www.experts-exchange.com/questions/Q.20177672.html
http://www.experts-exchange.com/questions/Q.20180896.html
http://www.experts-exchange.com/questions/Q.20189306.html
http://www.experts-exchange.com/questions/Q.20192697.html
http://www.experts-exchange.com/questions/Q.20193626.html
http://www.experts-exchange.com/questions/Q.20195237.html
http://www.experts-exchange.com/questions/Q.20244812.html
http://www.experts-exchange.com/questions/Q.20246719.html
http://www.experts-exchange.com/questions/Q.20261121.html
http://www.experts-exchange.com/questions/Q.20261146.html
http://www.experts-exchange.com/questions/Q.20269349.html
http://www.experts-exchange.com/questions/Q.20274432.html
http://www.experts-exchange.com/questions/Q.20289956.html

To view your locked questions, please click the following link(s) and evaluate the proposed answer.
http://www.experts-exchange.com/questions/Q.20181754.html
http://www.experts-exchange.com/questions/Q.20245940.html
http://www.experts-exchange.com/questions/Q.20253492.html

*****  E X P E R T S    P L E A S E  ******  Leave your closing recommendations.
If you are interested in the cleanup effort, please click this link
http://www.experts-exchange.com/jsp/qManageQuestion.jsp?ta=commspt&qid=20274643
POINTS FOR EXPERTS awaiting comments are listed in the link below
http://www.experts-exchange.com/commspt/Q.20277028.html
 
Moderators will finalize this question if in @14 days Asker has not responded.  This will be moved to the PAQ (Previously Asked Questions) at zero points, deleted or awarded.
 
Thanks everyone.
Moondancer
Moderator @ Experts Exchange
0
 
LVL 1

Expert Comment

by:Moondancer
Comment Utility
I have refunded 50 points to you for this question, since I did not provide you any technical solutions here, merely requested that you finalize this.

I have processed a question to award edey for the help given here.

Moondancer - EE Moderator
0
 
LVL 1

Expert Comment

by:Moondancer
Comment Utility
Points for edey -> http://www.experts-exchange.com/jsp/qShow.jsp?qid=20295019
Mike, please comment in that thread to complete this correction.
Moondancer - EE Moderator
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
Secure Boot on W8 & 8.1 8 44
Firewall issues 6 84
Sending Gmail through Delphi 3 69
Reconfigure Delphi Install? 2 34
This article explains how to create forms/units independent of other forms/units object names in a delphi project. Have you ever created a form for user input in a Delphi project and then had the need to have that same form in a other Delphi proj…
In my programming career I have only very rarely run into situations where operator overloading would be of any use in my work.  Normally those situations involved math with either overly large numbers (hundreds of thousands of digits or accuracy re…
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, Just open a new email message.  In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…
This video shows how to remove a single email address from the Outlook 2010 Auto Suggestion memory. NOTE: For Outlook 2016 and 2013 perform the exact same steps. Open a new email: Click the New email button in Outlook. Start typing the address: …

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now