Click here to Skip to main content
15,896,445 members
Home / Discussions / C#
   

C#

 
QuestionFind a Button with HitTest Pin
donovan.solms22-Jul-07 12:00
donovan.solms22-Jul-07 12:00 
AnswerRe: Find a Button with HitTest Pin
Luc Pattyn22-Jul-07 12:24
sitebuilderLuc Pattyn22-Jul-07 12:24 
GeneralRe: Find a Button with HitTest Pin
donovan.solms22-Jul-07 13:10
donovan.solms22-Jul-07 13:10 
GeneralRe: Find a Button with HitTest Pin
Luc Pattyn22-Jul-07 13:44
sitebuilderLuc Pattyn22-Jul-07 13:44 
QuestionThe Location of the cursor in a Text Box Pin
max2929722-Jul-07 11:23
max2929722-Jul-07 11:23 
AnswerRe: The Location of the cursor in a Text Box Pin
Christian Graus22-Jul-07 11:27
protectorChristian Graus22-Jul-07 11:27 
AnswerRe: The Location of the cursor in a Text Box Pin
mav.northwind22-Jul-07 19:17
mav.northwind22-Jul-07 19:17 
GeneralRe: The Location of the cursor in a Text Box Pin
max2929723-Jul-07 8:01
max2929723-Jul-07 8:01 
Thanks guys! Here's what I ended up doing...

<code>
char[] before = textBox.Substring(0, textBox.SelectionStart);
int lineBreaks;
int lastLineIndex;

for (int a = 0; a < before; a++) {
	if (before[a] == '\n') {
		lineBreaks++;
		lastLineIndex = a + 1;
	}
}

cursorPositionLabel.Text = "Ln " + lineBreaks.ToString()
cursorPositionLabel += " , Col " + (textBox.SelectionStart - lastLineIndex).ToString();
</code>


So much for preserving the tabs... Roll eyes | :rolleyes:





If I had a sig, it would probably go here.

Questionplease any one can help me pleeeeeeeeeeeeeeeeease to insert new row into DataGrid Pin
michaelqog22-Jul-07 10:54
michaelqog22-Jul-07 10:54 
QuestionHow to Stop the Form from Closing... Pin
max2929722-Jul-07 10:33
max2929722-Jul-07 10:33 
AnswerRe: How to Stop the Form from Closing... Pin
martin_hughes22-Jul-07 10:52
martin_hughes22-Jul-07 10:52 
AnswerRe: How to Stop the Form from Closing... Pin
Luc Pattyn22-Jul-07 11:05
sitebuilderLuc Pattyn22-Jul-07 11:05 
GeneralRe: How to Stop the Form from Closing... Pin
max2929722-Jul-07 11:19
max2929722-Jul-07 11:19 
GeneralRe: How to Stop the Form from Closing... Pin
Luc Pattyn22-Jul-07 17:35
sitebuilderLuc Pattyn22-Jul-07 17:35 
GeneralRe: How to Stop the Form from Closing... Pin
max2929723-Jul-07 8:03
max2929723-Jul-07 8:03 
QuestionDeleting items from ListView Pin
Saikek22-Jul-07 9:33
Saikek22-Jul-07 9:33 
AnswerRe: Deleting items from ListView Pin
Ravi Bhavnani22-Jul-07 13:34
professionalRavi Bhavnani22-Jul-07 13:34 
AnswerRe: Deleting items from ListView Pin
sidbaruah22-Jul-07 20:27
sidbaruah22-Jul-07 20:27 
QuestionProblem with getting string from bytes Pin
nc3b22-Jul-07 8:09
nc3b22-Jul-07 8:09 
AnswerRe: Problem with getting string from bytes Pin
Guffa22-Jul-07 9:05
Guffa22-Jul-07 9:05 
GeneralRe: Problem with getting string from bytes Pin
nc3b22-Jul-07 10:49
nc3b22-Jul-07 10:49 
GeneralRe: Problem with getting string from bytes Pin
Luc Pattyn22-Jul-07 11:03
sitebuilderLuc Pattyn22-Jul-07 11:03 
GeneralRe: Problem with getting string from bytes Pin
nc3b22-Jul-07 11:20
nc3b22-Jul-07 11:20 
GeneralRe: Problem in server or client. Pin
Luc Pattyn22-Jul-07 11:57
sitebuilderLuc Pattyn22-Jul-07 11:57 
AnswerRe: Problem with getting string from bytes Pin
Guffa22-Jul-07 12:40
Guffa22-Jul-07 12:40 

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.