473,406 Members | 2,467 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,406 software developers and data experts.

Richtextbox using EM_SETZOOM to set a zoom factor vs GDI and GDI+

Using a Richtextbox I use EM_SETZOOM to set a zoom factor.

If I set it to 2 the image on the screen increase but not exactly by 2.

I've coded a ruler above the Richtextbox which does scale by the correct
amount.

Could it be that the Richtextbox uses GDI while Dotnet uses GDI+ ?

Can anyone shed any light at all on this?
I'd really appreciate any info at all.

THANKS IN ADVANCE
Nov 16 '05 #1
3 5111
I found that it is not the difference between the ruler and the RTB.

Rather, the RTB is not consistent. If I use tabs to position characters and
right below use spaces to position characters, and then scale, the
characters do not remain lined up.

The tabbed characters remain aligned with the ruler but the spaced ones do
not.

Seem the space (and maybe other characters) gets scaled wrong.

Can anyone add or confirm or enlighten?
" Just Me" <gr****@a-znet.com> wrote in message
news:uZ**************@TK2MSFTNGP09.phx.gbl...
Using a Richtextbox I use EM_SETZOOM to set a zoom factor.

If I set it to 2 the image on the screen increase but not exactly by 2.

I've coded a ruler above the Richtextbox which does scale by the correct
amount.

Could it be that the Richtextbox uses GDI while Dotnet uses GDI+ ?

Can anyone shed any light at all on this?
I'd really appreciate any info at all.

THANKS IN ADVANCE

Nov 16 '05 #2
why use em_setzoom, the richtextbox already has a zoom property.
" Just Me" <gr****@a-znet.com> wrote in message
news:%2****************@tk2msftngp13.phx.gbl...
I found that it is not the difference between the ruler and the RTB.

Rather, the RTB is not consistent. If I use tabs to position characters
and right below use spaces to position characters, and then scale, the
characters do not remain lined up.

The tabbed characters remain aligned with the ruler but the spaced ones do
not.

Seem the space (and maybe other characters) gets scaled wrong.

Can anyone add or confirm or enlighten?
" Just Me" <gr****@a-znet.com> wrote in message
news:uZ**************@TK2MSFTNGP09.phx.gbl...
Using a Richtextbox I use EM_SETZOOM to set a zoom factor.

If I set it to 2 the image on the screen increase but not exactly by 2.

I've coded a ruler above the Richtextbox which does scale by the correct
amount.

Could it be that the Richtextbox uses GDI while Dotnet uses GDI+ ?

Can anyone shed any light at all on this?
I'd really appreciate any info at all.

THANKS IN ADVANCE


Nov 16 '05 #3
I had not noticed that. This is left over from a pre-net project
I'll bet the RTB zoom woks no better.

Thanks

"Patrick Blackman" <ca*******@videotron.ca> wrote in message
news:%2*****************@TK2MSFTNGP12.phx.gbl...
why use em_setzoom, the richtextbox already has a zoom property.
" Just Me" <gr****@a-znet.com> wrote in message
news:%2****************@tk2msftngp13.phx.gbl...
I found that it is not the difference between the ruler and the RTB.

Rather, the RTB is not consistent. If I use tabs to position characters
and right below use spaces to position characters, and then scale, the
characters do not remain lined up.

The tabbed characters remain aligned with the ruler but the spaced ones
do not.

Seem the space (and maybe other characters) gets scaled wrong.

Can anyone add or confirm or enlighten?
" Just Me" <gr****@a-znet.com> wrote in message
news:uZ**************@TK2MSFTNGP09.phx.gbl...
Using a Richtextbox I use EM_SETZOOM to set a zoom factor.

If I set it to 2 the image on the screen increase but not exactly by 2.

I've coded a ruler above the Richtextbox which does scale by the correct
amount.

Could it be that the Richtextbox uses GDI while Dotnet uses GDI+ ?

Can anyone shed any light at all on this?
I'd really appreciate any info at all.

THANKS IN ADVANCE



Nov 16 '05 #4

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

Similar topics

3
by: sachin | last post by:
How to customize PrintPreviewDialog, such that, addition of a new button, change the functionality of existing button should be possible programatically. Sample code will help a lot. Moreover, what...
6
by: johannblake | last post by:
I am wondering whether it is easy to setup a coordinate system for drawing (using GDI+) that uses meters (or any custom scaling for that matter). Currently, I need to convert from pixels to meters...
0
by: davide rocchelli | last post by:
I have found a probable bug when you draw with GDI. Look this simple code Private Sub Form1_Paint(ByVal sender As Object, ByVal e As System.Windows.Forms.PaintEventArgs) Handles MyBase.Paint ...
0
by: Matt | last post by:
This took way to long to figure out - now that I have it working I thought I would share with the group. I've seen tons of posts with very little good answers on this seemingly simple thing that...
3
by: Boni | last post by:
Dear all, I need a picturebox on which I can with GDI+ draw rectangles. The scroll and zoom should be supported. Do I have to manually resize rectangles,when zoom button clicked and change...
0
by: gplana | last post by:
Hi all. I'm trying to create an application with a RichTextBox control in order to let user introduce a formatted text, and then I generate a word2007 .docx document with that text. I added the...
0
by: johot | last post by:
I am currently creating a little photo application. In this application the user is able to zoom in the image and after zooming panning around inside the zoomed image with the mouse. The strange...
1
by: Andrus | last post by:
I need to save font selected by user by Ctrl+MouseWheel in Winforms RichTextBox. I tried override below but this does not remember font: in this method Font.Size property seems to be always...
0
by: Blacky | last post by:
hi, I have a form where in i dropped a crystal report viewer.I created a report sample.rpt and this is the code which binds my report to the viewer. If (Session("rep") Is Nothing) Then ...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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
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...
0
agi2029
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,...
0
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...

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.