Hello, I have a big problem to print an html file directly to the printer. I
use an "AxSHDocVw.AxWe bBrowser" object. Briefly, this is my code:
AxSHDocVw.AxWeb Browser myBrowser;
....
//this set of instruction prepare my document in html to be printed
string HtmlFileName = "Test.html" ;
Object o = new Object();
o = System.Reflecti on.Missing.Valu e;
myBrowser.Silen t = true;
myBrowser.Navig ate(HtmlFileNam e);
// when it is ready the callback goes here
private void myBrowser_Docum entComplete(obj ect sender, System.EventArg s e)
{
myBrowser.ExecW B(SHDocVw.OLECM DID.OLECMDID_PR INT,
SHDocVw.OLECMDE XECOPT.OLECMDEX ECOPT_DONTPROMP TUSER, ref o, ref o);
}
When i call it (ExecWB) it generates an exception "Trying to revoke a drop
target that has not been registered".
Someone know how I can solve this problem, or if there is a quicker o
simpler method to solve it?
Thank you,
Regards,
Andrea 1 5802
Hi Andrea,
Unfortunately I don't know what that error is about but if you don't mind
prompting the user you can get a reference to the IHTMLWindow2 object and
call window.print();
- Dave Sexton
"Digitek" <Di*****@discus sions.microsoft .comwrote in message
news:46******** *************** ***********@mic rosoft.com...
Hello, I have a big problem to print an html file directly to the printer.
I
use an "AxSHDocVw.AxWe bBrowser" object. Briefly, this is my code:
AxSHDocVw.AxWeb Browser myBrowser;
...
//this set of instruction prepare my document in html to be printed
string HtmlFileName = "Test.html" ;
Object o = new Object();
o = System.Reflecti on.Missing.Valu e;
myBrowser.Silen t = true;
myBrowser.Navig ate(HtmlFileNam e);
// when it is ready the callback goes here
private void myBrowser_Docum entComplete(obj ect sender, System.EventArg s e)
{
myBrowser.ExecW B(SHDocVw.OLECM DID.OLECMDID_PR INT,
SHDocVw.OLECMDE XECOPT.OLECMDEX ECOPT_DONTPROMP TUSER, ref o, ref o);
}
When i call it (ExecWB) it generates an exception "Trying to revoke a drop
target that has not been registered".
Someone know how I can solve this problem, or if there is a quicker o
simpler method to solve it?
Thank you,
Regards,
Andrea
This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Lars Schlanbusch |
last post by:
Hi!
Is there any way to set <base target="_blank"> for links which link to a
page outside the domain, and <base target="_self"> for links which link to a
page inside the domain?
Can i do such a thing in the global.asa file or maybe in an other include
asp file? I am working on a site with 3-4000 hyperlinks, and I do not look
forward to "marching" through every each one ove them and set target to
_blank og _self...
|
by: Rui Pestana |
last post by:
Hello all,
I want to use the POST method to submit the form and then grab the
parameters in the asp file with request.form("parm").
The problem is that I am using the _search target to open the asp
page.
When I use _blank target there is no problem, either I use GET or POST
method.
But when I use _search target, only GET method works.
|
by: Tony Marston |
last post by:
The code
<a href="..." target="_blank">...</a>
will not validate as XHTML STRICT because of the 'target' tag, so how do I
achieve the same result by moving it to a CSS file? I cannot find anything
which allows me to specify 'target=' on an anchor tag.
--
Tony Marston
http://www.tonymarston.net
|
by: pocm |
last post by:
Hi,
What's the property/value I need to set in css for A to mimic the
results of
<a href="..." target="_new">...</a>?
Cheers,
Paulo Matos
|
by: jgctr4 |
last post by:
I'm trying to print an HTML file using AxWebBrowser.ExecWB but it it gives a run time error "Trying to revoke a drop target that has not been registered". Does anyone have any suggestions?
axWebBrowser1.QueryStatusWB(SHDocVw.OLECMDID.OLECMDID_PRINT);
object o = "";
SHDocVw.OLECMDID Print = SHDocVw.OLECMDID.OLECMDID_PRINT;
SHDocVw.OLECMDEXECOPT PromptUser = SHDocVw.OLECMDEXECOPT.OLECMDEXECOPT_PROMPTUSER;
axWebBrowser1.ExecWB(Print,...
| |
by: Larry R Harrison Jr |
last post by:
I have them working now, courtesy of the link given in the prior thread--the
HVMenu over at Dynamic Drive myself.
http://www.dynamicdrive.com
I have them working as side-bar menus, not horizontal ones on TOP of the
page.
I figured it out and have it working fine, except for one thing--apparently
I need to insert the code for the menu for every last HTML file I have
|
by: Phre2d |
last post by:
We are attempting to move a large development project into the .NET
age over time. We have a large number of ATL-based COM objects in
this project. Following the "Journal Poster" example provided by MS,
I have converted some of my COM projects into mixed code so that there
is both a .NET and COM interface to the underlying logic. So far, so
good.
In one of these former COM projects, four additional COM objects are
within from the...
|
by: Kevin Buchan |
last post by:
I came in today and tried to edit a project that I was working with,
locally, at the tail end of last week. This web project was created,
hosted, and only edited locally.
I truly cannot remember anything that I installed/changed on my
workstation that could have goofed up my IIS, but I simply cannot get
VS 2003 to be able to open an exiting or create a new web project.
I have tried the following:
* Uninstall and Reinstall IIS...
|
by: msnews.microsoft.com |
last post by:
I want to redirect the user to a url outside of our website but I want it to
preserve our application's window by opening a new window. We have a
datagrid that has five hyperlink columns containing links to external sites.
The hyperlink columns have the target="_blank" attribute so they preserve
the existing window. This works OK except that the NavigateURL's are quite
long due to the size of the query string and this makes the page slow. ...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
| |
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |