Click here to Skip to main content
15,888,521 members
Home / Discussions / C#
   

C#

 
GeneralRe: Display Assembly Resources in Web Browser (problem with jpg/pdf) Pin
sodevrom10-May-09 13:10
sodevrom10-May-09 13:10 
QuestionSelf-updating application by using batch files (Need Help) Pin
SimpleData10-May-09 6:28
SimpleData10-May-09 6:28 
AnswerRe: Self-updating application by using batch files (Need Help) Pin
Giorgi Dalakishvili10-May-09 7:00
mentorGiorgi Dalakishvili10-May-09 7:00 
GeneralRe: Self-updating application by using batch files (Need Help) Pin
SimpleData10-May-09 7:22
SimpleData10-May-09 7:22 
Questionmultine textbox maxlenght depending of height and widht control Pin
ramaluciano10-May-09 4:39
ramaluciano10-May-09 4:39 
AnswerRe: multine textbox maxlenght depending of height and widht control Pin
Henry Minute10-May-09 5:13
Henry Minute10-May-09 5:13 
GeneralRe: multine textbox maxlenght depending of height and widht control Pin
ramaluciano10-May-09 5:45
ramaluciano10-May-09 5:45 
GeneralRe: multine textbox maxlenght depending of height and widht control Pin
Henry Minute10-May-09 6:37
Henry Minute10-May-09 6:37 
The only method I can think of would only give an approximation, so for what it is worth.

The VisualTextRenderer class has a GetTextMetrics method. The structure returned contains details such as FontHeight, AverageCharWidth, MaxCharWidth etc. for the Font and Graphics it is given.

You could divide the height of the TextBox by the FontHeight to give the number of lines. Then use either Average or Max Width to calculate how many characters fit on a line.

I have no idea how accurate this would be though.

Henry Minute

Do not read medical books! You could die of a misprint. - Mark Twain
Girl: (staring) "Why do you need an icy cucumber?"
“I want to report a fraud. The government is lying to us all.”

Questionprocess modifying/openning file Pin
lost_in_code10-May-09 2:27
lost_in_code10-May-09 2:27 
AnswerRe: process modifying/openning file Pin
Dave Kreskowiak10-May-09 6:04
mveDave Kreskowiak10-May-09 6:04 
Questionconverting the numeric value to text Pin
jaillani khan10-May-09 2:26
jaillani khan10-May-09 2:26 
AnswerRe: converting the numeric value to text Pin
Luc Pattyn10-May-09 2:34
sitebuilderLuc Pattyn10-May-09 2:34 
GeneralRe: converting the numeric value to text Pin
jaillani khan10-May-09 8:22
jaillani khan10-May-09 8:22 
QuestionNew form variables passing Pin
michaelgr110-May-09 1:15
michaelgr110-May-09 1:15 
AnswerRe: New form variables passing Pin
Henry Minute10-May-09 1:26
Henry Minute10-May-09 1:26 
GeneralRe: New form variables passing Pin
michaelgr110-May-09 1:34
michaelgr110-May-09 1:34 
GeneralRe: New form variables passing Pin
Henry Minute10-May-09 1:37
Henry Minute10-May-09 1:37 
GeneralRe: New form variables passing Pin
michaelgr110-May-09 1:47
michaelgr110-May-09 1:47 
GeneralRe: New form variables passing Pin
Colin Angus Mackay10-May-09 3:22
Colin Angus Mackay10-May-09 3:22 
GeneralRe: New form variables passing Pin
michaelgr110-May-09 3:52
michaelgr110-May-09 3:52 
GeneralRe: New form variables passing Pin
N a v a n e e t h10-May-09 4:34
N a v a n e e t h10-May-09 4:34 
GeneralRe: New form variables passing Pin
Henry Minute10-May-09 5:09
Henry Minute10-May-09 5:09 
GeneralRe: New form variables passing Pin
michaelgr110-May-09 6:47
michaelgr110-May-09 6:47 
GeneralRe: New form variables passing Pin
Henry Minute10-May-09 6:58
Henry Minute10-May-09 6:58 
GeneralRe: New form variables passing Pin
michaelgr110-May-09 7:04
michaelgr110-May-09 7:04 

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.