473,666 Members | 2,555 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Set Alignment when printing Richtext with C#

Hello,
I am working on printing richtext with C# by sending
EM_FORMATRANGE message to the underlying richedit
control.
I can set the text format by sending EM_SETPARAFORMA T
message now. However, when I tried to set the wAlignment
to be PFA_JUSTIFY, it didn't work. I know it only works
with Rich Edit 2.0 or later version. Isn't Windows Forms
using the newest richedit control?
How can I upgrade it if it is because of that?

Many Thanks,

Jason
Jul 19 '05 #1
0 1813

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

Similar topics

0
3212
by: Jason Xu | last post by:
Hello, I am working on printing richtext with C# by sending EM_FORMATRANGE message to the underlying richedit control. I can set the text format by sending EM_SETPARAFORMAT message now. However, when I tried to set the wAlignment to be PFA_JUSTIFY, it didn't work. I know it only works with Rich Edit 2.0 or later version. Isn't Windows Forms using the newest richedit control? How can I upgrade it if it is because of that?
1
4360
by: David Lindgren | last post by:
Hello! I am using the DrawString method with different StringAlignments passed to it and the result varies alot! Take a look at this screenshot: http://www.lowrad.net/files/alignment_screenshot.jpg As you can see I am printing four different text in each of the the parts of this image. ( The three parts are three images)
10
23304
by: Jeff B. | last post by:
Has anyone come across a decent algorithm for implementing word wrap features in .net printing? I have a small component that uses basic printing techniques (i.e. e.Graphics.DrawString in a PrintPage event of a PrintDocument object) to send some formatted text to the printer. However, if the lines are too long they run off the page rather than wrapping around. I'm sure I can spend the time and come up with a word wrapping algorithm but...
0
1317
by: Stuart Woodard | last post by:
I am struggling to develop a robust mechanism for server-side printing with formatted documents. I need to produce print-spool files from the remote server-side application. This isn't straightforward with PrintDocument, so I have had to create a new class that uses Windows calls from within the PrintPage event. That solved the spool file problem, but I have since been having trouble with formatted text. To use PrintPage events, I...
1
1824
by: mivey4 | last post by:
I have a project for which I need to print the contents of a richtext box to the printer. In VB6 this was a very simplified task but in VB.NET it seems to be noted as a more complicated technique. I have been programming for a short while but my strategy for learning new tasks is to view the most simplified version of code available. This way I can easily see the logic and proceed to complicate things based upon my own learning however I...
3
2024
by: rigamonk | last post by:
Is there a way to save richtext from a richtextbox into an access DB using vb.net? thanks patrick
2
8083
by: John Smith | last post by:
Hi all; Putting "Due" into the column header of a datagrid. Font is a proportional fort. When the alignment is left, there is some space between the column separator bar and the D in Due. When the alignment is center, Due is centered in the header box. When the alignment is right, the e in Due is partially covered by the column separator bar. Adding space after Due (i.e.. "Due ") does not work. HeaderText seems to be trimmed before...
0
388
by: Jason Xu | last post by:
Hello, I am working on printing richtext with C# by sending EM_FORMATRANGE message to the underlying richedit control. I can set the text format by sending EM_SETPARAFORMAT message now. However, when I tried to set the wAlignment to be PFA_JUSTIFY, it didn't work. I know it only works with Rich Edit 2.0 or later version. Isn't Windows Forms using the newest richedit control? How can I upgrade it if it is because of that?
0
839
by: Matthew Butler | last post by:
Is there an easir way to print out rtf text from a text box i have on my form rather than writing each character along with its font to a print control. I can see I can do it this way but if I do it this way I then cant see how I would then print a mix of richtext and an embedded graphic
0
8454
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8363
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
8787
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
8561
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8645
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 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...
1
6203
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
5672
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
4372
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
2013
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.