Click here to Skip to main content
16,019,140 members
Home / Discussions / C#
   

C#

 
QuestionError using tao framework Pin
billy_iii20-Sep-09 11:42
billy_iii20-Sep-09 11:42 
AnswerRe: Error using tao framework Pin
Henry Minute20-Sep-09 12:40
Henry Minute20-Sep-09 12:40 
GeneralRe: Error using tao framework Pin
billy_iii20-Sep-09 13:23
billy_iii20-Sep-09 13:23 
GeneralRe: Error using tao framework Pin
Dave Kreskowiak20-Sep-09 16:59
mveDave Kreskowiak20-Sep-09 16:59 
AnswerRe: Error using tao framework Pin
carlecomm29-Sep-09 1:25
carlecomm29-Sep-09 1:25 
QuestionCorsor position Pin
Muammar©20-Sep-09 10:29
Muammar©20-Sep-09 10:29 
AnswerRe: Corsor position Pin
Abhishek Sur20-Sep-09 10:32
professionalAbhishek Sur20-Sep-09 10:32 
AnswerRe: Corsor position Pin
Luc Pattyn20-Sep-09 11:01
sitebuilderLuc Pattyn20-Sep-09 11: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 11:18
Muammar©20-Sep-09 11:18 
GeneralRe: Corsor position Pin
Daniel Grunwald20-Sep-09 13:19
Daniel Grunwald20-Sep-09 13:19 
GeneralRe: Corsor position Pin
Luc Pattyn20-Sep-09 13:54
sitebuilderLuc Pattyn20-Sep-09 13:54 
QuestionNullReferenceException untraceable Pin
akhanal20-Sep-09 10:10
akhanal20-Sep-09 10:10 
AnswerRe: NullReferenceException untraceable Pin
Abhishek Sur20-Sep-09 10:31
professionalAbhishek Sur20-Sep-09 10:31 
GeneralRe: NullReferenceException untraceable [modified] Pin
akhanal20-Sep-09 10:37
akhanal20-Sep-09 10:37 
GeneralRe: NullReferenceException untraceable Pin
akhanal20-Sep-09 10:44
akhanal20-Sep-09 10:44 
GeneralRe: NullReferenceException untraceable Pin
Luc Pattyn20-Sep-09 11:03
sitebuilderLuc Pattyn20-Sep-09 11:03 
GeneralRe: NullReferenceException untraceable Pin
akhanal21-Sep-09 4:07
akhanal21-Sep-09 4:07 
GeneralRe: NullReferenceException untraceable Pin
Abhishek Sur20-Sep-09 11:04
professionalAbhishek Sur20-Sep-09 11:04 
Questionproxy page rank Pin
Omar Gameel Salem20-Sep-09 9:57
professionalOmar Gameel Salem20-Sep-09 9:57 
Answerre: proxy page rank Pin
Pete O'Hanlon20-Sep-09 11:02
mvePete O'Hanlon20-Sep-09 11:02 
GeneralRe: re: proxy page rank Pin
Omar Gameel Salem20-Sep-09 11:05
professionalOmar Gameel Salem20-Sep-09 11:05 
GeneralRe: re: proxy page rank Pin
Pete O'Hanlon20-Sep-09 11:42
mvePete O'Hanlon20-Sep-09 11:42 
GeneralRe: re: proxy page rank Pin
Omar Gameel Salem20-Sep-09 11:58
professionalOmar Gameel Salem20-Sep-09 11:58 
GeneralRe: re: proxy page rank Pin
Pete O'Hanlon20-Sep-09 12:29
mvePete O'Hanlon20-Sep-09 12:29 
GeneralRe: re: proxy page rank Pin
Richard MacCutchan20-Sep-09 21:49
mveRichard MacCutchan20-Sep-09 21: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.