Click here to Skip to main content
16,013,440 members
Home / Discussions / C#
   

C#

 
AnswerRe: How repaint the color of ColumnHead in ListView? Pin
Heath Stewart19-Jun-04 6:58
protectorHeath Stewart19-Jun-04 6:58 
Generalform at runtime Pin
Member 114126618-Jun-04 22:45
Member 114126618-Jun-04 22:45 
GeneralRe: form at runtime Pin
Heath Stewart19-Jun-04 7:00
protectorHeath Stewart19-Jun-04 7:00 
GeneralYahoo and C# Pin
MeterMan18-Jun-04 21:55
MeterMan18-Jun-04 21:55 
GeneralRe: Yahoo and C# Pin
Nick Parker19-Jun-04 4:41
protectorNick Parker19-Jun-04 4:41 
GeneralRe: Yahoo and C# Pin
MeterMan19-Jun-04 6:44
MeterMan19-Jun-04 6:44 
GeneralRe: Yahoo and C# Pin
Heath Stewart19-Jun-04 6:50
protectorHeath Stewart19-Jun-04 6:50 
GeneralRe: Yahoo and C# Pin
Heath Stewart19-Jun-04 6:48
protectorHeath Stewart19-Jun-04 6:48 
You can do this programmatically at runtime, too, instead of using Spy++ as Nick said. You have to P/Invoke FindWindow and/or FindWindowEx, which you can search for windows using their title or class name (better using the class name since it'll never change).

Using this, you can keep calling FindWindow(Ex) using the previous found window as the parent until you get to your child (since the screen name may be in an edit control which may be in a list-box control, which may be hosted in a dialog, etc.), and then call WM_GETTEXT to get their screen name.

There's no truly generic way of doing, this, though. What Nick and I mentioned would be the closest thing to generic as possible, since you could design your recursive window finding algorithm to use heuristics to find screen names; when it does, it knows it's found the right window (that contains the screen names).

 

Microsoft MVP, Visual C#
My Articles
GeneralRe: Yahoo and C# Pin
MeterMan19-Jun-04 10:14
MeterMan19-Jun-04 10:14 
GeneralRe: Yahoo and C# Pin
eggie519-Jun-04 15:24
eggie519-Jun-04 15:24 
GeneralRe: Yahoo and C# Pin
eggie519-Jun-04 15:51
eggie519-Jun-04 15:51 
GeneralRe: Yahoo and C# Pin
MeterMan19-Jun-04 16:41
MeterMan19-Jun-04 16:41 
GeneralRe: Yahoo and C# Pin
eggie519-Jun-04 16:46
eggie519-Jun-04 16:46 
GeneralRe: Yahoo and C# Pin
Heath Stewart20-Jun-04 9:46
protectorHeath Stewart20-Jun-04 9:46 
GeneralRe: Yahoo and C# Pin
MeterMan20-Jun-04 10:43
MeterMan20-Jun-04 10:43 
GeneralRe: Yahoo and C# Pin
eggie519-Jun-04 17:49
eggie519-Jun-04 17:49 
GeneralRe: Yahoo and C# Pin
MeterMan19-Jun-04 18:25
MeterMan19-Jun-04 18:25 
GeneralRe: Yahoo and C# Pin
eggie519-Jun-04 19:21
eggie519-Jun-04 19:21 
GeneralRe: Yahoo and C# Pin
MeterMan20-Jun-04 16:38
MeterMan20-Jun-04 16:38 
GeneralRe: Yahoo and C# Pin
eggie519-Jun-04 19:11
eggie519-Jun-04 19:11 
GeneralRe: saving collection automaticaly into form`s code file. Pin
Mazdak18-Jun-04 22:18
Mazdak18-Jun-04 22:18 
GeneralRe: saving collection automaticaly into form`s code file. Pin
Member 114126618-Jun-04 22:52
Member 114126618-Jun-04 22:52 
QuestionNewbie Q: C# ASPX Popup? Pin
Joel, Just Joel18-Jun-04 16:04
Joel, Just Joel18-Jun-04 16:04 
AnswerRe: Newbie Q: C# ASPX Popup? Pin
Heath Stewart18-Jun-04 18:37
protectorHeath Stewart18-Jun-04 18:37 
GeneralRe: Newbie Q: C# ASPX Popup? Pin
Joel, Just Joel21-Jun-04 15:34
Joel, Just Joel21-Jun-04 15:34 

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.