473,748 Members | 8,376 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Size of AxWebBrowser print preview window in C#

I have a class that creates an AxWebBrowser object in the
background, loads some arbitrary html content, then shows
the user a print preview. The only problem is, this print
preview is a tiny little window on the top left hand
corner of the screen.

Thinking that this may have something to do with the Print
Preview dialog not being able to detect from it's caller's
size so that it can set its own size equal to that of the
caller, I moved everything over to a form instead. That
worked, except that the whole point is to not show the
user the class/form that performs all the background
operations. Whenever the form is
minimized/hidden/notshown, the print preview dialog will
appear as a tiny little dialog box on the top left corner.
Only when the form is actually visible will the print
preview dialog take the size of the visible form. This is
highly annoying since what I am trying to achieve is
basically allowing the user to right click on something
(say a hyperlink) and select print. He/she will then be
shown a print preview of whatever the link points to.

thanks for any advice!
Nov 15 '05 #1
0 2024

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
1721
by: yooyoo | last post by:
I am implementing print template solution. I would like to use it in asp app. I open new document then generate print preview then print and finally close preview window, but I am not able to close previewed document. I try to move document window out of screen - somewhere like 9999999,9999999 position, view preview then print and finnaly close preview window. Then document window is invisible but still exists. How can I close the document...
0
2246
by: Malcolm Cook | last post by:
I've discovered: Using "File > Print Preview" in a form's datasheet view with a server Filter crashes access after previewing... ....that is, unless ServerFilterByForm has been turned off after applying the filter. See the steps to recreate bug below for details.
1
2608
by: sea | last post by:
I have Access 2002 and I am writing this application with a custom menu bar that has a print preview button -- the start up options hide the design window. The problem is that when an open form is viewed in print preview mode by clicking the print preview button, and later closed by clicking on the control X in the top right corner of the preview window, the form simply closes out and there is no more form to be seen, just a blank screen....
0
1152
by: David Thielen | last post by:
Hi; I have a form window that places an AxWebBrowser control in it and I can display html fine. However, I am now trying to print (and save and e-mail) the page. The following should, I believe, work. But nothing happens - it just returns. And I can't find any way to debug it running the script. mshtml.IHTMLDocument2 doc = (mshtml.IHTMLDocument2)axWebBrowser.Document; if (doc != null) doc.parentWindow.execScript("window.print();",...
3
10206
by: Clint MacDonald | last post by:
I have used the AxWebBrowser in a Visual Basic Project... I found that both Framework 1.0 and 1.1 had to be installed for it to work properly. I now have found that in Studio 2003, that the probablem has come back even if both are installed. When I open a windows form that has the Browser on it and try to Navigate to a page using the OnEnter or OnLoad events, the page just sits there and does
2
14126
by: Dean Slindee | last post by:
Anybody written code in VB.NET to: 1) show a print preview window of reports already written and stored in an Access 2002 database; or 2) execute the print of a report stored in an Access 2002 database? Thanks, Dean Slindee
22
130345
by: stephen | last post by:
I have created an order form that users javascript to create a new html document when the customers clicks the "print page" button. Once the new document has been created it then prints the document and closes it with the following code: <body onload="window.print(); window.close();"> This works correctly (or at least the way I expect it to work under MS Internet Explorer, but it cuases Netscape to "crash"
3
4306
by: drtitus7759 | last post by:
I am using MS-Access 2003. I have a restricted applications for multiple users where when they start it up, it enters a series of menus and screens and does not let them at the various Access menus, buttons, or options. I would like to set the Access window size to a specific size and maximize the form within the Access window. Also, I perform a print preview on all reports and have the users hit Ctrl-P to actually print it. Is there a...
5
15998
by: maminx | last post by:
hello all, i want to call window print preview (in browser, File - Print Preview) by javascript, this is the code function printpreview() { var OLECMDID = 7; /* OLECMDID values: * 6 - print * 7 - print preview * 1 - open window
0
8991
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8830
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,...
0
9541
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
9321
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9247
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
4602
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4874
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3312
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
3
2215
bsmnconsultancy
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...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.