Click here to Skip to main content
15,913,610 members
Home / Discussions / C#
   

C#

 
QuestionHow do you organize your projects? Pin
Adam °Wimsatt15-Sep-04 11:24
Adam °Wimsatt15-Sep-04 11:24 
AnswerRe: How do you organize your projects? Pin
Christian Graus15-Sep-04 11:27
protectorChristian Graus15-Sep-04 11:27 
AnswerRe: How do you organize your projects? Pin
Heath Stewart15-Sep-04 12:01
protectorHeath Stewart15-Sep-04 12:01 
GeneralRe: How do you organize your projects? Pin
Adam °Wimsatt15-Sep-04 12:07
Adam °Wimsatt15-Sep-04 12:07 
GeneralRe: How do you organize your projects? Pin
Heath Stewart15-Sep-04 14:04
protectorHeath Stewart15-Sep-04 14:04 
GeneralRe: How do you organize your projects? Pin
Adam °Wimsatt16-Sep-04 4:38
Adam °Wimsatt16-Sep-04 4:38 
GeneralRe: How do you organize your projects? Pin
Heath Stewart15-Sep-04 14:06
protectorHeath Stewart15-Sep-04 14:06 
GeneralRe: How do you organize your projects? Pin
Nick Parker15-Sep-04 16:46
protectorNick Parker15-Sep-04 16:46 
GeneralRe: How do you organize your projects? Pin
Heath Stewart16-Sep-04 5:11
protectorHeath Stewart16-Sep-04 5:11 
GeneralRe: How do you organize your projects? Pin
Dave Kreskowiak16-Sep-04 4:01
mveDave Kreskowiak16-Sep-04 4:01 
GeneralRe: How do you organize your projects? Pin
Heath Stewart16-Sep-04 5:21
protectorHeath Stewart16-Sep-04 5:21 
GeneralDecision help please Pin
Jayne Klaus Smith15-Sep-04 10:43
Jayne Klaus Smith15-Sep-04 10:43 
GeneralRe: Decision help please Pin
Christian Graus15-Sep-04 10:50
protectorChristian Graus15-Sep-04 10:50 
GeneralRe: Decision help please Pin
Adam °Wimsatt15-Sep-04 11:26
Adam °Wimsatt15-Sep-04 11:26 
GeneralRe: Decision help please Pin
Heath Stewart15-Sep-04 11:55
protectorHeath Stewart15-Sep-04 11:55 
GeneralRe: Decision help please Pin
Heath Stewart15-Sep-04 11:58
protectorHeath Stewart15-Sep-04 11:58 
QuestionHow to get highlighted text from a window e.g IE? Pin
Palfo15-Sep-04 10:24
sussPalfo15-Sep-04 10:24 
AnswerRe: How to get highlighted text from a window e.g IE? Pin
Heath Stewart15-Sep-04 10:37
protectorHeath Stewart15-Sep-04 10:37 
There is no universal way. Internet Explorer and other Microsoft COM servers (like Word) use a TextRange object. From Internet Explorer - if you have a reference to the current IHTMLDocument2, you can create a TextRange by using IHTMLDocument2.selection to get an IHTMLSelectionObject, and if not null call IHTMLSelectionObject.createRange. The process is similar for Office products, but uses Office-specific objects to get a TextRange (a different class but works the same).

For text boxes and rich edit controls (encapsulates by the TextBox and RichTextBox controls, but are just Windows Common Controls classes "EDIT" and "RichEdit" (1.0), "RichEdit20A" (2.0; ANSI), or "RichEdit20W" (2.0; Unicode), you can P/Invoke SendMessage and pass EM_GETSEL (or EM_GETSELTEXT for Rich Edit controls - both work but work differently) to the control's HWND (exposed by the Control.Handle property inheritted by each control in Windows Forms).

If this is from another application to which you don't have a reference (or handle), P/Invoke FindWindow and/or FindWindowEx. This process has been discussed many times in this forum so click "Search comments" for more information.


This posting is provided "AS IS" with no warranties, and confers no rights.

Software Design Engineer
Developer Division Sustained Engineering
Microsoft

[My Articles]
GeneralRe: How to get highlighted text from a window e.g IE? Pin
fossmo16-Sep-04 11:17
fossmo16-Sep-04 11:17 
GeneralRe: How to get highlighted text from a window e.g IE? Pin
Heath Stewart16-Sep-04 11:57
protectorHeath Stewart16-Sep-04 11:57 
GeneralRe: How to get highlighted text from a window e.g IE? Pin
fossmo21-Sep-04 11:30
fossmo21-Sep-04 11:30 
GeneralSNMP Traps Pin
sin6715-Sep-04 9:58
sin6715-Sep-04 9:58 
GeneralRe: SNMP Traps Pin
Heath Stewart15-Sep-04 10:27
protectorHeath Stewart15-Sep-04 10:27 
GeneralRe: SNMP Traps Pin
sin6726-Oct-04 9:01
sin6726-Oct-04 9:01 
QuestionFile/Directory Exists? Pin
tdciDoug15-Sep-04 9:56
tdciDoug15-Sep-04 9:56 

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.