Articles   Members Online:
-Article/Tip Search
-News Group Search over 21 Million news group articles.
-Delphi/Pascal
-CBuilder/C++
-C#Builder/C#
-JBuilder/Java
-Kylix
Member Area
-Home
-Account Center
-Top 10 NEW!!
-Submit Article/Tip
-Forums Upgraded!!
-My Articles
-Edit Information
-Login/Logout
-Become a Member
-Why sign up!
-Newsletter
-Chat Online!
-Indexes NEW!!
Employment
-Build your resume
-Find a job
-Post a job
-Resume Search
Contacts
-Contacts
-Feedbacks
-Link to us
-Privacy/Disclaimer
Embarcadero
Visit Embarcadero
Embarcadero Community
JEDI
Links
How to print from WebBrowser Turn on/off line numbers in source code. Switch to Orginial background IDE or DSP color Comment or reply to this aritlce/tip for discussion. Bookmark this article to my favorite article(s). Print this article
Print from WebBrowser 09-Sep-04
Category
Internet / Web
Language
Delphi 4.x
Views
331
User Rating
No Votes
# Votes
0
Replies
0
Publisher:
Darley, F. Joe
Reference URL:
			1   
2   unit Unit1;
3   
4   interface
5   
6   uses
7     Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
8     Dialogs, OleCtrls, SHDocVw, StdCtrls;
9   
10  type
11    TForm1 = class(TForm)
12      btnGoTo: TButton;
13      WebBrowser1: TWebBrowser;
14      btnPrint: TButton;
15      procedure btnGoToClick(Sender: TObject);
16      procedure btnPrintClick(Sender: TObject);
17    private
18      { Private declarations }
19    public
20      { Public declarations }
21    end;
22  
23  var
24    Form1: TForm1;
25  
26  implementation
27  
28  {$R *.dfm}
29  
30  procedure TForm1.btnGoToClick(Sender: TObject);
31  //gose to website
32  var
33    Flags: OLEVariant;
34  begin
35  Flags:=0;
36  WebBrowser1.Navigate(WideString('http://www.borland.com'), Flags, Flags, Flags,
37   Flags);
38  
39  end;
40  
41  procedure TForm1.btnPrintClick(Sender: TObject);
42  //prints website
43  var
44    I, O: OleVariant;
45  begin
46    I := 0;
47    WebBrowser1.ExecWB(OLECMDID_PRINT, OLECMDEXECOPT_DONTPROMPTUSER, I, O);
48  
49  end;
50  
51  end.


			
Vote: How useful do you find this Article/Tip?
Bad Excellent
1 2 3 4 5 6 7 8 9 10

 

Advertisement
Share this page
Advertisement
Download from Google

Copyright © Mendozi Enterprises LLC