Click here to Skip to main content
15,911,142 members
Home / Discussions / C#
   

C#

 
GeneralRe: Remote database connection Pin
ednrgc29-Jan-07 4:49
ednrgc29-Jan-07 4:49 
GeneralRe: Remote database connection Pin
Colin Angus Mackay29-Jan-07 4:52
Colin Angus Mackay29-Jan-07 4:52 
AnswerRe: Remote database connection Pin
Colin Angus Mackay29-Jan-07 4:15
Colin Angus Mackay29-Jan-07 4:15 
GeneralRe: Remote database connection Pin
wheelerbarry29-Jan-07 4:18
wheelerbarry29-Jan-07 4:18 
GeneralRe: Remote database connection Pin
Michael P Butler29-Jan-07 4:48
Michael P Butler29-Jan-07 4:48 
AnswerRe: Remote database connection Pin
Aaron VanWieren29-Jan-07 5:02
Aaron VanWieren29-Jan-07 5:02 
AnswerRe: Remote database connection Pin
Eric Georgiades29-Jan-07 21:34
Eric Georgiades29-Jan-07 21:34 
QuestionDirection of selection in a TextBox/RichTextBox Pin
mav.northwind29-Jan-07 3:34
mav.northwind29-Jan-07 3:34 
Hi folks!

I just came across a nasty problem I don't have a solution for.
When you have a selection in a textbox/richtextbox you can only query the start and length of the selection (SelectionStart, SelectionLength). SelectionStart is always the left margin of the selection and SelectionLength is always >= 0.
Unfortunately, that way it's impossible to tell in which direction the selection has been created: Left to right or right to left.

In most cases this is not a problem but I want to adjust the selection exactly the way it can be done using Shift+Cursor Left/Right. With this combination you can always move the end of the selection around, even when the end of the selection is left of the selection start.

I've even tried using EM_GETSEL to retrieve the start and end of the selection, but - just as SelectionLength is always >= 0 - the selection start is always <= the selection end Frown | :(

Does anyone have an idea how to get to this extra information?

Regards,
mav

--
Black holes are the places where God divided by 0...

AnswerRe: Direction of selection in a TextBox/RichTextBox Pin
bobsugar22229-Jan-07 3:47
bobsugar22229-Jan-07 3:47 
GeneralRe: Direction of selection in a TextBox/RichTextBox Pin
mav.northwind29-Jan-07 4:20
mav.northwind29-Jan-07 4:20 
GeneralRe: Direction of selection in a TextBox/RichTextBox Pin
bobsugar22229-Jan-07 5:04
bobsugar22229-Jan-07 5:04 
GeneralRe: Direction of selection in a TextBox/RichTextBox Pin
mav.northwind29-Jan-07 6:45
mav.northwind29-Jan-07 6:45 
AnswerRe: Direction of selection in a TextBox/RichTextBox Pin
ednrgc29-Jan-07 3:49
ednrgc29-Jan-07 3:49 
GeneralRe: Direction of selection in a TextBox/RichTextBox Pin
mav.northwind29-Jan-07 4:23
mav.northwind29-Jan-07 4:23 
QuestionSystem.Net.Sockets - Tracing with TraceSource class Pin
wurzel_cidermaker29-Jan-07 3:09
wurzel_cidermaker29-Jan-07 3:09 
AnswerRe: System.Net.Sockets - Tracing with TraceSource class Pin
wurzel_cidermaker30-Jan-07 22:15
wurzel_cidermaker30-Jan-07 22:15 
QuestionCall a javascript function from a Link Button Pin
Bobb198229-Jan-07 3:08
Bobb198229-Jan-07 3:08 
AnswerRe: Call a javascript function from a Link Button Pin
GaryWoodfine 29-Jan-07 3:40
professionalGaryWoodfine 29-Jan-07 3:40 
GeneralRe: Call a javascript function from a Link Button Pin
Bobb198229-Jan-07 18:34
Bobb198229-Jan-07 18:34 
GeneralRe: Call a javascript function from a Link Button Pin
GaryWoodfine 29-Jan-07 22:13
professionalGaryWoodfine 29-Jan-07 22:13 
GeneralRe: Call a javascript function from a Link Button Pin
Bobb198230-Jan-07 1:43
Bobb198230-Jan-07 1:43 
Questioncustom group controls Pin
NoCake29-Jan-07 2:31
NoCake29-Jan-07 2:31 
AnswerRe: custom group controls Pin
bobsugar22229-Jan-07 3:00
bobsugar22229-Jan-07 3:00 
GeneralRe: custom group controls [modified] Pin
NoCake29-Jan-07 4:29
NoCake29-Jan-07 4:29 
QuestionIgnore Warning like in C++ Pin
Roland Bär29-Jan-07 2:06
Roland Bär29-Jan-07 2:06 

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.