Click here to Skip to main content
15,796,456 members
Home / Discussions / C#
   

C#

 
QuestionError using tao framework Pin
billy_iii20-Sep-09 12:42
billy_iii20-Sep-09 12:42 
AnswerRe: Error using tao framework Pin
Henry Minute20-Sep-09 13:40
Henry Minute20-Sep-09 13:40 
GeneralRe: Error using tao framework Pin
billy_iii20-Sep-09 14:23
billy_iii20-Sep-09 14:23 
GeneralRe: Error using tao framework Pin
Dave Kreskowiak20-Sep-09 17:59
mveDave Kreskowiak20-Sep-09 17:59 
AnswerRe: Error using tao framework Pin
carlecomm29-Sep-09 2:25
carlecomm29-Sep-09 2:25 
QuestionCorsor position Pin
Muammar©20-Sep-09 11:29
Muammar©20-Sep-09 11:29 
AnswerRe: Corsor position Pin
Abhishek Sur20-Sep-09 11:32
professionalAbhishek Sur20-Sep-09 11:32 
AnswerRe: Corsor position Pin
Luc Pattyn20-Sep-09 12:01
sitebuilderLuc Pattyn20-Sep-09 12:01 
Hi,

there is a sibbling method called MeasureString, when used correctly it provides information about the size a DrawString is going to take. However there are minor deviations, there even is a CP article on that subject.

I expect most text processors (when using a proportional font) would draw only one word at a time, and store all the coordinates; so you would need MeasureString only inside a word, and visual feedback with a caret sufficiently solves inaccuracies.

BTW: the few lines of code you have shown are horrible for performance and memory, as they create new objects (Font, Brush) for every Paint, and don't Dispose of them.

Smile | :)

Luc Pattyn

Have a look at my entry for the lean-and-mean competition; please provide comments, feedback, discussion, and don’t forget to vote for it! Thank you.

Local announcement (Antwerp region): Lange Wapper? Neen!


GeneralRe: Corsor position Pin
Muammar©20-Sep-09 12:18
Muammar©20-Sep-09 12:18 
GeneralRe: Corsor position Pin
Daniel Grunwald20-Sep-09 14:19
Daniel Grunwald20-Sep-09 14:19 
GeneralRe: Corsor position Pin
Luc Pattyn20-Sep-09 14:54
sitebuilderLuc Pattyn20-Sep-09 14:54 
QuestionNullReferenceException untraceable Pin
akhanal20-Sep-09 11:10
akhanal20-Sep-09 11:10 
AnswerRe: NullReferenceException untraceable Pin
Abhishek Sur20-Sep-09 11:31
professionalAbhishek Sur20-Sep-09 11:31 
GeneralRe: NullReferenceException untraceable [modified] Pin
akhanal20-Sep-09 11:37
akhanal20-Sep-09 11:37 
GeneralRe: NullReferenceException untraceable Pin
akhanal20-Sep-09 11:44
akhanal20-Sep-09 11:44 
GeneralRe: NullReferenceException untraceable Pin
Luc Pattyn20-Sep-09 12:03
sitebuilderLuc Pattyn20-Sep-09 12:03 
GeneralRe: NullReferenceException untraceable Pin
akhanal21-Sep-09 5:07
akhanal21-Sep-09 5:07 
GeneralRe: NullReferenceException untraceable Pin
Abhishek Sur20-Sep-09 12:04
professionalAbhishek Sur20-Sep-09 12:04 
Questionproxy page rank Pin
Omar Gameel Salem20-Sep-09 10:57
professionalOmar Gameel Salem20-Sep-09 10:57 
Answerre: proxy page rank Pin
Pete O'Hanlon20-Sep-09 12:02
subeditorPete O'Hanlon20-Sep-09 12:02 
GeneralRe: re: proxy page rank Pin
Omar Gameel Salem20-Sep-09 12:05
professionalOmar Gameel Salem20-Sep-09 12:05 
GeneralRe: re: proxy page rank Pin
Pete O'Hanlon20-Sep-09 12:42
subeditorPete O'Hanlon20-Sep-09 12:42 
GeneralRe: re: proxy page rank Pin
Omar Gameel Salem20-Sep-09 12:58
professionalOmar Gameel Salem20-Sep-09 12:58 
GeneralRe: re: proxy page rank Pin
Pete O'Hanlon20-Sep-09 13:29
subeditorPete O'Hanlon20-Sep-09 13:29 
GeneralRe: re: proxy page rank Pin
Richard MacCutchan20-Sep-09 22:49
mveRichard MacCutchan20-Sep-09 22:49 

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.