Click here to Skip to main content
15,920,633 members
Home / Discussions / Visual Basic
   

Visual Basic

 
AnswerRe: Datagridview Column Pin
Andy_L_J19-Aug-10 20:00
Andy_L_J19-Aug-10 20:00 
Questioninstalling to older versions of Windows Pin
RyJaBy18-Aug-10 8:25
RyJaBy18-Aug-10 8:25 
AnswerRe: installing to older versions of Windows Pin
Dave Kreskowiak18-Aug-10 9:08
mveDave Kreskowiak18-Aug-10 9:08 
AnswerRe: installing to older versions of Windows Pin
Tom Deketelaere19-Aug-10 2:30
professionalTom Deketelaere19-Aug-10 2:30 
GeneralRe: installing to older versions of Windows Pin
RyJaBy19-Aug-10 2:42
RyJaBy19-Aug-10 2:42 
QuestionDetecting selected text Pin
Pasan14817-Aug-10 7:21
Pasan14817-Aug-10 7:21 
AnswerRe: Detecting selected text Pin
Dave Kreskowiak17-Aug-10 14:41
mveDave Kreskowiak17-Aug-10 14:41 
AnswerRe: Detecting selected text Pin
Tom Foswick24-Aug-10 22:45
Tom Foswick24-Aug-10 22:45 
Yes, this is possible in most circumstances.

The first problem is in identifying which window you care about. Multiple applications can have text selected at the same time. You can make clever use of FindWindow() and FindWindowEx() to get a handle to the window in question.

The second problem is in identifying the GUI element on that window that might have text that you are interested in. This is actually a much more complicated problem since the GUI element could be any sort of object, nested anywhere on the window. You could use GetWindow() to help with this.

The third problem is telling what text is selected within that GUI element. The way you do this depends on the GUI element in question. In a few cases, it may not even be possible. I'm not really sure where I would begin to try to crack that nut.

There are a ton of useful API calls that you can use at http://msdn.microsoft.com/en-us/library/ff468919%28v=VS.85%29.aspx[^]

You might almost be better off thinking about this problem differently. You could, for example, set up some global system hooks to capture the relevant mouse and keyboard events that occur when text is selected. Then, you would have immediate and direct insight into the objects with which you were dealing. Read this article for an idea of where to start with that approach: Global System Hooks in .NET[^]

Good luck.
QuestionTextBox_Leave event only fired when move mouse to other control in vb.net 2005 Pin
Andraw Tang17-Aug-10 6:19
Andraw Tang17-Aug-10 6:19 
AnswerRe: TextBox_Leave event only fired when move mouse to other control in vb.net 2005 Pin
riced17-Aug-10 7:23
riced17-Aug-10 7:23 
GeneralRe: TextBox_Leave event only fired when move mouse to other control in vb.net 2005 Pin
Andraw Tang17-Aug-10 8:12
Andraw Tang17-Aug-10 8:12 
GeneralRe: TextBox_Leave event only fired when move mouse to other control in vb.net 2005 Pin
Eddy Vluggen17-Aug-10 9:00
professionalEddy Vluggen17-Aug-10 9:00 
GeneralRe: TextBox_Leave event only fired when move mouse to other control in vb.net 2005 Pin
Andraw Tang17-Aug-10 8:26
Andraw Tang17-Aug-10 8:26 
GeneralRe: TextBox_Leave event only fired when move mouse to other control in vb.net 2005 Pin
Eddy Vluggen17-Aug-10 9:02
professionalEddy Vluggen17-Aug-10 9:02 
GeneralRe: TextBox_Leave event only fired when move mouse to other control in vb.net 2005 Pin
Andraw Tang17-Aug-10 9:17
Andraw Tang17-Aug-10 9:17 
GeneralRe: TextBox_Leave event only fired when move mouse to other control in vb.net 2005 Pin
Eddy Vluggen17-Aug-10 9:38
professionalEddy Vluggen17-Aug-10 9:38 
GeneralRe: TextBox_Leave event only fired when move mouse to other control in vb.net 2005 Pin
Andraw Tang17-Aug-10 9:55
Andraw Tang17-Aug-10 9:55 
GeneralRe: TextBox_Leave event only fired when move mouse to other control in vb.net 2005 Pin
Eddy Vluggen17-Aug-10 10:20
professionalEddy Vluggen17-Aug-10 10:20 
GeneralRe: TextBox_Leave event only fired when move mouse to other control in vb.net 2005 Pin
Andraw Tang17-Aug-10 10:29
Andraw Tang17-Aug-10 10:29 
GeneralRe: TextBox_Leave event only fired when move mouse to other control in vb.net 2005 Pin
Eddy Vluggen17-Aug-10 11:00
professionalEddy Vluggen17-Aug-10 11:00 
GeneralRe: TextBox_Leave event only fired when move mouse to other control in vb.net 2005 Pin
Andraw Tang17-Aug-10 11:15
Andraw Tang17-Aug-10 11:15 
GeneralRe: TextBox_Leave event only fired when move mouse to other control in vb.net 2005 Pin
Eddy Vluggen17-Aug-10 11:47
professionalEddy Vluggen17-Aug-10 11:47 
AnswerRe: TextBox_Leave event only fired when move mouse to other control in vb.net 2005 Pin
nikhilhegde00717-Aug-10 21:40
nikhilhegde00717-Aug-10 21:40 
GeneralRe: TextBox_Leave event only fired when move mouse to other control in vb.net 2005 Pin
Andraw Tang18-Aug-10 4:27
Andraw Tang18-Aug-10 4:27 
QuestionFile.Delete Method Pin
98fireblade17-Aug-10 5:08
98fireblade17-Aug-10 5:08 

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.