Click here to Skip to main content
15,917,795 members
Home / Discussions / C#
   

C#

 
GeneralRe: program stucks cause it opened modal dialog in other application Pin
Stefan Troschuetz8-Mar-05 1:23
Stefan Troschuetz8-Mar-05 1:23 
GeneralRe: program stucks cause it opened modal dialog in other application Pin
mav.northwind8-Mar-05 1:43
mav.northwind8-Mar-05 1:43 
GeneralRe: program stucks cause it opened modal dialog in other application Pin
Stefan Troschuetz8-Mar-05 1:52
Stefan Troschuetz8-Mar-05 1:52 
GeneralRe: program stucks cause it opened modal dialog in other application Pin
mav.northwind8-Mar-05 2:00
mav.northwind8-Mar-05 2:00 
GeneralRe: program stucks cause it opened modal dialog in other application Pin
3Dizard8-Mar-05 2:17
3Dizard8-Mar-05 2:17 
GeneralCursor Position Pin
chettu8-Mar-05 0:13
chettu8-Mar-05 0:13 
GeneralRe: Cursor Position Pin
mav.northwind8-Mar-05 1:44
mav.northwind8-Mar-05 1:44 
GeneralRe: Cursor Position Pin
Stefan Troschuetz8-Mar-05 1:44
Stefan Troschuetz8-Mar-05 1:44 
I think you can get this information through evaluation of SelectionStart, SelectionLength and SelectedText properties.
MSDN states that if no text is selected in the control, the SelectionStart property indicates the insertion point for new text i.e. the current cursor position. If otherwise something is selected, the cursor position should be the sum of SelectionStart and SelectionLength.
int cursorPos;
if (textbox.SelectedText == string.Empty)
 cursorPos = textbox.SelectionStart;
else
 cursorPos = textbox.SelectionStart + textbox.SelectionLength;


P.S: All information bases on research in MSDN topics, so the above code snippet isn't tested and comes without warranty Smile | :)







www.troschuetz.de
GeneralRe: Cursor Position Pin
NassosReyzidis10-Mar-05 0:09
NassosReyzidis10-Mar-05 0:09 
GeneralRe: Cursor Position Pin
chettu8-Mar-05 3:04
chettu8-Mar-05 3:04 
GeneralRe: Cursor Position Pin
Stefan Troschuetz8-Mar-05 3:20
Stefan Troschuetz8-Mar-05 3:20 
GeneralCredits Algorithm Pin
Simon Wren8-Mar-05 0:11
professionalSimon Wren8-Mar-05 0:11 
GeneralRe: Credits Algorithm Pin
leppie8-Mar-05 1:32
leppie8-Mar-05 1:32 
GeneralRe: Credits Algorithm Pin
Simon Wren8-Mar-05 1:48
professionalSimon Wren8-Mar-05 1:48 
GeneralRe: Credits Algorithm Pin
Simon Wren8-Mar-05 2:15
professionalSimon Wren8-Mar-05 2:15 
GeneralRe: Credits Algorithm Pin
LongRange.Shooter8-Mar-05 3:15
LongRange.Shooter8-Mar-05 3:15 
GeneralRe: Credits Algorithm Pin
LongRange.Shooter8-Mar-05 3:20
LongRange.Shooter8-Mar-05 3:20 
GeneralAttachment Event/Method for Accessing Outlook Pin
Adnan Siddiqi7-Mar-05 23:15
Adnan Siddiqi7-Mar-05 23:15 
GeneralInsert Help Pin
GaMBiT_KC7-Mar-05 21:06
GaMBiT_KC7-Mar-05 21:06 
GeneralRe: Insert Help Pin
Kodanda Pani7-Mar-05 22:17
Kodanda Pani7-Mar-05 22:17 
GeneralRe: Insert Help Pin
GaMBiT_KC8-Mar-05 0:19
GaMBiT_KC8-Mar-05 0:19 
GeneralMultithreading and Appdomain Pin
joshi_vipul7-Mar-05 18:39
joshi_vipul7-Mar-05 18:39 
GeneralRe: Multithreading and Appdomain Pin
Robert Rohde7-Mar-05 19:28
Robert Rohde7-Mar-05 19:28 
GeneralRe: Multithreading and Appdomain Pin
7-Mar-05 19:47
suss7-Mar-05 19:47 
GeneralRe: Multithreading and Appdomain Pin
J4amieC7-Mar-05 22:11
J4amieC7-Mar-05 22:11 

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.