RE: PrintPreviewControl
- From: Richard MSL <RichardKirkness@xxxxxxxxxxxxx>
- Date: Tue, 4 Sep 2007 06:30:02 -0700
Thanks again. In the end I wrote my own PrintPreviewControl, and it was not
too hard, I did not need all the capabilities of the .NET version. I record
what I have written where, so that when the user selects the text, I can look
up and see what I wrote there, it seems to work fine. Thanks for all the help.
""Jeffrey Tan[MSFT]"" wrote:
Hi Richard,.
Thanks for your feedback.
If your requirement is be able to select any text on the form, I do not
know of any controls for this task. Actually, this is not a trivial task.
The displayed texts on the from are drawn by different controls on the
form. For example, the text in TextBox is drawn by TextBox control window
procedure. Any code may invoke DrawText/TextOut win32 GDI APIs to draw text
on the form. There is no single simple way to grab all the text on the
form.
If you really wanted to achieve this task, it is very complex. I know one
type of screen word translation software will use low-level Win32 API
hooking technology to intercept any DrawText/TextOut win32 GDI API calling
and grab the text in these APIs parameter. I think we still have to hook
the GDI+ text drawing APIs. This type of API hooking technology is complex
to implement and .Net has no support for it, you have to implement it in
Win32 C/C++ code. If you are curious regarding API hooking, please refer to
the article below:
http://www.codeproject.com/system/hooksys.asp
Anyway, this type of requirement has gone out of .Net Framework support
ability. Thanks for your understanding.
Best regards,
Jeffrey Tan
Microsoft Online Community Support
==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
ications.
Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscriptions/support/default.aspx.
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.
- Follow-Ups:
- RE: PrintPreviewControl
- From: "Jeffrey Tan[MSFT]"
- RE: PrintPreviewControl
- References:
- RE: PrintPreviewControl
- From: "Jeffrey Tan[MSFT]"
- RE: PrintPreviewControl
- Prev by Date: Re: Microsoft.SqlServer.Management.Smo
- Next by Date: Re: Configuration data for a Windows Service
- Previous by thread: RE: PrintPreviewControl
- Next by thread: RE: PrintPreviewControl
- Index(es):
Relevant Pages
|