fguihen Posted December 13, 2005 Posted December 13, 2005 i want to be able to type a report into a text box, and then print it out , as it is in the text box. im using a rich textbox. how do i make sure the text box is the same size as an A4 sheet? Quote
rot13 Posted December 14, 2005 Posted December 14, 2005 What is the width and height of an A4 paper? The best way I know to do this is with code similiar to the following: this.richtextbox.width = this.CreateGraphics.dpiX * <width_of_A4_in_inches>; this.richtextbox.height = this.CreateGraphics.dpiY * <height_of_A4_in_inches>; Where you need to put that code is determined by the program, and the form it's on and stuff. If it wont be resized, then you can just put that in the Form_Load method. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.