473,748 Members | 7,118 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

PrintPreviewCon trol / PrintPreviewDia log: Image location within the client area

Context: I have to print personal information on a preprinted form I've
never seen using a printer I've never seen. I want to use a control to
overlay the PrintPreview to indicate where I've printed. I want to use a
separate control in order to allow the user to drag the field to a different
position on the form so it doesn't have to come back for me to change the
code. I want to use the PrintPreview because it fits so naturally with
printing to the real printer. Note that one consequence of this strategy is
that I'll need to relocate the highlight as the PrintPreview is zoomed or
panned. Pretend that I'm using a label control with a transparent
background.

I can't find the position of the image within the PrintPreviewCon trol or the
PrintPreviewDia log. I've tried deriving classes from each. In the debugger
I can see several fields which are not referenced in the documentation and
which, not surprisingly, are not available to my code. One of them appears
to include the image size and location.

1. (How) can I get to the image location.

2. A control on top of the PrintPreviewCon trol shows the printed document
image through the label. A control on top of the PrintPreviewDia log (form)
shows the dialog's background through the label. Should I assume that the
Dialog approach is a dead end?

3. What else am I not seeing?

Thanks,
Ramsey
Jul 21 '05 #1
3 2565
Hi Ramsey,

First of all, I would like to confirm my understanding of your issue. From
your description, I understand that you need to get the position of image
that is displayed on the PrintPreview control. If there is any
misunderstandin g, please feel free to let me know.

I didn't find the property to get the position of the image yet. If you can
see some member that indicates the position of the print document image,
that must be a private member. Thus, we can use Reflection classes to get
the value of them. However, since this is not documented, it is not
recommended to do so. When the preview document is zoomed or scrolled, the
label will not move to new position accordingly.

Please check the following link for more information about reflection.

http://msdn.microsoft.com/library/de...us/cpref/html/
frlrfsystemrefl ection.asp

HTH.

Kevin Yu
=======
"This posting is provided "AS IS" with no warranties, and confers no
rights."

Jul 21 '05 #2
Yep. That's the idea. And, sure, the control won't reposition itself, but
if I can position it originally, I can do it again.

Plan B is to add a highlight at the time I print the preview, but then
moving the highlight cannot be done by dragging, but must be done in another
window.

The dragging part is working. I just have no idea where I'm dragging from
or to!

"Kevin Yu [MSFT]" <v-****@online.mic rosoft.com> wrote in message
news:L4******** ******@cpmsftng xa10.phx.gbl...
Hi Ramsey,

First of all, I would like to confirm my understanding of your issue. From
your description, I understand that you need to get the position of image
that is displayed on the PrintPreview control. If there is any
misunderstandin g, please feel free to let me know.

I didn't find the property to get the position of the image yet. If you can see some member that indicates the position of the print document image,
that must be a private member. Thus, we can use Reflection classes to get
the value of them. However, since this is not documented, it is not
recommended to do so. When the preview document is zoomed or scrolled, the
label will not move to new position accordingly.

Please check the following link for more information about reflection.

http://msdn.microsoft.com/library/de...us/cpref/html/ frlrfsystemrefl ection.asp

HTH.

Kevin Yu
=======
"This posting is provided "AS IS" with no warranties, and confers no
rights."

Jul 21 '05 #3
Hi Ramsey,

Thanks for sharing your experience with all the people here. If you have
any questions, please feel free to post them in the community.

Kevin Yu
=======
"This posting is provided "AS IS" with no warranties, and confers no
rights."

Jul 21 '05 #4

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

Similar topics

0
1187
by: sachin | last post by:
How to sence click event on the document when two pages are displayed in PrintPreviewControl. How to identify which page is clicked Moreover can we hookup Vertical scroll bar to Next/Previous Page, i.e. similar to PrintPreviewDialog.
0
1329
by: Sachin | last post by:
Hello, I am trying to make a customized PrintPreviewDialog using PrintPreviewControl. Can any one please explain how to change the cursor only on the document that is displayed in the Preview control? We can use the cursor property of the PrintPreviewControl, but that is not useful, as when you move in to the Preview control, the cursor changes even if you are not on the document. Is there any way to get the document area, so that we can check...
1
2954
by: Tim | last post by:
Hi, I want to use a PrintPreviewControl instead of the dialog which is too restrictive. I have found a basic tutorial but I have lots of other questions: 1. How do I implement next and previous buttons? 2. How do I change the cursor only when it is over the document? 3. How do I implement zoom buttons? 4. What about showing multiple pages per screen?
4
2036
by: Troy | last post by:
Hi all, Im a little new to ASP.NET. I'm looking to create an image viewer that zooms in, pretty common. But I need to draw a box on the 1:1 scale image and 'zoom in' on another picture box. The box outlining the zoom area would change in size according to the level of zoom of course. The help I need is how to get the target box to appear over the 1:1 scale image. I want it to be able to be dragged to a new location in the full
3
386
by: Ramsey Schaffnit | last post by:
Context: I have to print personal information on a preprinted form I've never seen using a printer I've never seen. I want to use a control to overlay the PrintPreview to indicate where I've printed. I want to use a separate control in order to allow the user to drag the field to a different position on the form so it doesn't have to come back for me to change the code. I want to use the PrintPreview because it fits so naturally with...
2
445
by: gsb58 | last post by:
Hi! I seem to be missing something when using the PrintPreviewDialog. On a form I have a monthCalendar which, at runtime, will display all months of the year. Now I have routine for printing the calendar and it works fine. However, when I try to bind this object to the PrintPreviewDialog, the dialog is blank. Can anybody guide me?
1
2464
by: Richard MSL | last post by:
I was using a PrintPreviewDialog, and it previewed the file nicely, I could page through it, etc. But I could not control the printing, so I made my own form with a PrintPreviewControl on it, and buttons to print as I want. The problem is that it no longer supports paging throught the preview, it just stays on the first page. I can write my own PageUp and PageDown buttons, but there does not seem to be a way to tell the...
0
989
by: madval | last post by:
How can I get the pages of printPreviewDialog or printPreviewControl as images (if possible without openning the dialog)?? I am printpreviewing the content of a richtextbox and I want to screenshot the printed pages. thanks
6
4757
by: David Stone | last post by:
I have a simple question about the alt content of area elements within an image map: is it redundant to include phrases such as "link to..." or "jump to..."? My initial thought is 'yes', since the area element implies a link to some other item or page location, but would like to hear what others think. If it helps at all, the page which prompted me to ask the question is this one: ...
0
8823
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
9530
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...
0
9363
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 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...
1
6793
isladogs
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...
0
6073
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();...
0
4864
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3300
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
2
2775
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2206
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.