473,396 Members | 1,895 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

adding a custom control to print preview dialog

Any ideas on how to do this. It comes with print, zoom, close etc. But I want
to add a button for font change/redisplay.

Just knowing how to get the button on there is all I need.
--
mark
Nov 21 '05 #1
5 4785
The print preview dialog is inherited from the old VB6 CommonDialog control.
If you delve deep enough in the VB.NET help, it comes with a function which
allows subclassing.

Let me know your findings

Good luck.

"mark" wrote:
Any ideas on how to do this. It comes with print, zoom, close etc. But I want
to add a button for font change/redisplay.

Just knowing how to get the button on there is all I need.
--
mark

Nov 21 '05 #2
"mark" <ma**@discussions.microsoft.com> schrieb:
Any ideas on how to do this. It comes with print, zoom, close etc. But I
want to add a button for font change/redisplay.


Create a form that inherits from 'PrintPreviewDialog' and add the controls.

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://dotnet.mvps.org/dotnet/faqs/>
Nov 21 '05 #3
Can you also do that with the Open/Save dialog boxes? Also, override the
other buttons/controls on those dialog boxes too the same way? I mean disable
create new folder, search the web & also add a listview under the filename or
extend the dialog box in some way?

"Herfried K. Wagner [MVP]" wrote:
"mark" <ma**@discussions.microsoft.com> schrieb:
Any ideas on how to do this. It comes with print, zoom, close etc. But I
want to add a button for font change/redisplay.


Create a form that inherits from 'PrintPreviewDialog' and add the controls.

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://dotnet.mvps.org/dotnet/faqs/>

Nov 21 '05 #4
"Crouchie1998" <Cr**********@discussions.microsoft.com> schrieb:
Can you also do that with the Open/Save dialog boxes?
No, that's not possible, because these dialogs are no .NET Windows Forms
dialogs.
Also, override the other buttons/controls on those dialog boxes
too the same way?


This can be done using a Win32 dialog hook only.

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://dotnet.mvps.org/dotnet/faqs/>

Nov 21 '05 #5

Inherits System.Windows.Forms.PrintPreviewDialog works but I had to
comment out the line "Me.SuspendLayout()" in the windows form designer code
to get the button to behave properly. What's that all about?

Also, the toolbar can not be modified.

"Herfried K. Wagner [MVP]" wrote:
"mark" <ma**@discussions.microsoft.com> schrieb:
Any ideas on how to do this. It comes with print, zoom, close etc. But I
want to add a button for font change/redisplay.


Create a form that inherits from 'PrintPreviewDialog' and add the controls.

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://dotnet.mvps.org/dotnet/faqs/>

Nov 21 '05 #6

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

Similar topics

1
by: Matt | last post by:
If I do the following, it will pop up print dialog. But i want to produce "File->Print Preview" Screen. Is it possible to do that? <input type="button" value='Print Preview'...
2
by: Robin | last post by:
I need to add a checkbox to the common dialog control for opening files. I know it is possible to customize the common dialog thru API. But the sample codes I have seen were too long and...
3
by: Bob Darlington | last post by:
When I press F1 in print preview, I get the following error message for some (but not all) reports: 'The expression on Key Down you entered as the event property setting, produced the following...
0
by: John | last post by:
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...
1
by: Sachin | last post by:
I have a customized Print Preview dialog made of a Print Preview control. When I increase to zoom property, the document inside it gets enlarged and two scroll bars appear. But when I scroll down...
4
by: sachin | last post by:
Hi I am working on report using print preview dialog control in windows application. Report is displayed properly in control. With paper size 850X1350 (Legal)(Lanscape mode=true) . But when...
3
by: dvdastor | last post by:
Hello, Is there a way that anyone knows of to preview an HTML string and have it formatted as HTML in a PrintPreviewDialog? In other words, can the PrintDocument that is required for this...
0
by: John Smith | last post by:
Hello, I am developing a VB.NET 2003 application that will use lots of Crystal Reports. Sometimes the users will preview a report in a Crystal report viewer, and sometimes they will send the...
2
by: Brad Pears | last post by:
I have some sample code that uses the print dialog, print preview and a print direct options. If I select print preview and then click the printer icon from that, the document prints. If I...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
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,...
0
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...
0
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,...
0
jinu1996
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...
0
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...

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.