Click here to Skip to main content
15,895,011 members
Home / Discussions / C#
   

C#

 
GeneralRe: How can i understand the file i've load is a correct PNG file? Pin
Anonymous26-Jun-05 21:53
Anonymous26-Jun-05 21:53 
GeneralRe: How can i understand the file i've load is a correct PNG file? Pin
Christian Graus27-Jun-05 13:34
protectorChristian Graus27-Jun-05 13:34 
GeneralVersion Information Pin
Mr. Naveed Butt26-Jun-05 9:51
professionalMr. Naveed Butt26-Jun-05 9:51 
GeneralInternet Explorer hooks Pin
Ryan333326-Jun-05 9:50
Ryan333326-Jun-05 9:50 
GeneralAdvanced problem again Pin
snouto26-Jun-05 9:26
snouto26-Jun-05 9:26 
GeneralRe: Advanced problem again Pin
Christian Graus26-Jun-05 16:01
protectorChristian Graus26-Jun-05 16:01 
GeneralRe: Advanced problem again Pin
mav.northwind26-Jun-05 20:02
mav.northwind26-Jun-05 20:02 
GeneralPrinting Rich Text Box to printer Pin
74Camaro26-Jun-05 8:55
74Camaro26-Jun-05 8:55 
Good Day,

I am printing a form to a printer, but when I type in text, to my Rich Text Box, I noticed that the printer prints the size of the box (616,64), but if there is any text that you need to scroll to see, it prints it below the box! It's really kind of funny....

How can I change my code (below) so that it prints all the text in the box, without going outside the box, I guess it needs to dynamically change the size of the Rich Text Box being sent to the image....

Any help would be great!

case "RichTextBox":

RichTextBox rtb = (RichTextBox)c;

g.FillRectangle(new SolidBrush(rtb.BackColor), rtb.Left+1, rtb.Top + 1, rtb.Width+2, rtb.Height -2);

g.DrawString(rtb.Text, rtb.Font, new SolidBrush(rtb.ForeColor), rtb.Left + 2, rtb.Top + rtb.Height/2 - g.MeasureString("a", rtb.Font).Height/2, new StringFormat());

break;

I am assuming I need to change the g.DrawString, but not sure to what.

Thanks,

G
GeneralRe: Printing Rich Text Box to printer Pin
mav.northwind27-Jun-05 1:28
mav.northwind27-Jun-05 1:28 
GeneralRe: Printing Rich Text Box to printer Pin
74Camaro27-Jun-05 4:21
74Camaro27-Jun-05 4:21 
GeneralRe: Printing Rich Text Box to printer Pin
mav.northwind27-Jun-05 5:42
mav.northwind27-Jun-05 5:42 
Generaltwain output to bitmap Pin
sami_bio@yahoo.com26-Jun-05 7:55
sami_bio@yahoo.com26-Jun-05 7:55 
GeneralRe: twain output to bitmap Pin
Christian Graus26-Jun-05 16:01
protectorChristian Graus26-Jun-05 16:01 
GeneralProcesses Pin
thepersonof26-Jun-05 6:08
thepersonof26-Jun-05 6:08 
GeneralRe: Processes Pin
S. Senthil Kumar26-Jun-05 6:37
S. Senthil Kumar26-Jun-05 6:37 
GeneralRe: Processes Pin
leppie26-Jun-05 6:38
leppie26-Jun-05 6:38 
GeneralRe: Processes Pin
MandMG26-Jun-05 11:21
MandMG26-Jun-05 11:21 
Generalcontaining directory from filepath Pin
Anonymous26-Jun-05 5:23
Anonymous26-Jun-05 5:23 
GeneralRe: containing directory from filepath Pin
leppie26-Jun-05 6:32
leppie26-Jun-05 6:32 
GeneralRe: containing directory from filepath Pin
Torsten Mauz26-Jun-05 23:32
Torsten Mauz26-Jun-05 23:32 
Generalwindows controls Pin
sianatia26-Jun-05 5:11
sianatia26-Jun-05 5:11 
Generalactive ipaddress Pin
amarsumanth26-Jun-05 4:56
amarsumanth26-Jun-05 4:56 
GeneralRe: active ipaddress Pin
S. Senthil Kumar26-Jun-05 6:28
S. Senthil Kumar26-Jun-05 6:28 
GeneralRe: active ipaddress Pin
Dave Kreskowiak26-Jun-05 9:20
mveDave Kreskowiak26-Jun-05 9:20 
Generalabout Gina in XP Pin
Veelone26-Jun-05 2:24
Veelone26-Jun-05 2:24 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.