Главная страница | назад





Article #19716: Printing a web page with the HTML control

 Question and Answer Database

     FAQ: FAQ4716C - Printing a web page with the HTML control
Category: Internet/WEB
Platform: All-32Bit
 Product: All-CBuilder,   C++Builder3.x,   C++Builder4.x,   

Question:

How do I print a WEB page with the HTML control?


Answer:

Use either the HTML control's AutoPrint method, or 
alternatively use the PrintPage method.

Example using AutoPrint:

//in unit1.h
#include 

void __fastcall TForm1::Button1Click(TObject *Sender)
{
    TCursor OldCur;
    OldCur = Screen->Cursor;
    Printer->BeginDoc();
    HTML1->AutoPrint(Printer->Handle);
    Printer->Title = HTML1->URL;
    Printer->EndDoc();
    Screen->Cursor = OldCur;
}

8/4/99 11:57:56 AM
 

Last Modified: 01-SEP-99