[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Ulrich Sprick

8/8/2003 4:41:00 PM

Hi Ruslan,

you can use the shell for opening and printing a document. In C++, i did:

HINSTANCE result = ShellExecute( this->Handle,
"open", // verb ---> "print"
"help.BackupControlFrm.htm", // file name
"", // parameters
"", // default dir
SW_SHOWNORMAL // show mode
);

To port it to .Net should not bee difficult (hints in the docs, look for "interop support" or so).

Which application does the printing you can see from the file extension association ( in NT4 Explorer: Menu View-Options-File Types,
select HTML Document, click "edit". The following dialog list the actions associated with that document type. There should be an
entry named "print" and/or "printto". Select it and click "edit". Then you can see the app that is called for this action, and the
parameter list you'll have to provide in the ShellExecute() call. The ShellExecute does the same what you can achive with a
right-click on a file in Explorer.

hth,
ulli

----- Original Message -----
From: "Ruslan" <ruslan_albu@hotmail.com>
Newsgroups:
microsoft.public.dotnet.faqs,microsoft.public.dotnet.framework,microsoft.public.dotnet.framework.sdk,microsoft.public.dotnet.framewo
rk.windowsforms.databinding,microsoft.public.dotnet.general,microsoft.public.dotnet.languages.csharp
Sent: Sunday, August 03, 2003 1:39 PM
Subject: Print HTML page


> Hi All,
>
>
>
> Can anybody tell me how to print a HTML page without open it?
>
>
>
> Thanks,
>
>
>
> Ruslan
>
>