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 3 2568
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."
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."
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." This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
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.
|
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...
|
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?
|
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
|
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...
| |
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?
|
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...
|
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
|
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:
...
|
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: 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...
| |
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: 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...
|
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: 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...
|
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...
| |