Click here to Skip to main content
15,888,461 members
Home / Discussions / C#
   

C#

 
GeneralRe: Wisdom of deriving a control from Panel Pin
Heath Stewart25-May-04 10:11
protectorHeath Stewart25-May-04 10:11 
GeneralRe: Wisdom of deriving a control from Panel Pin
Joel Holdsworth25-May-04 10:15
Joel Holdsworth25-May-04 10:15 
GeneralRe: Wisdom of deriving a control from Panel Pin
Joel Holdsworth25-May-04 10:29
Joel Holdsworth25-May-04 10:29 
GeneralDisplay an install date and a print date. Pin
kornstyle25-May-04 9:01
kornstyle25-May-04 9:01 
GeneralRe: Display an install date and a print date. Pin
Heath Stewart25-May-04 9:49
protectorHeath Stewart25-May-04 9:49 
GeneralRe: Display an install date and a print date. Pin
kornstyle25-May-04 11:03
kornstyle25-May-04 11:03 
QuestionCan I send mouse clicks to another application? Pin
ekolis25-May-04 8:52
ekolis25-May-04 8:52 
AnswerRe: Can I send mouse clicks to another application? Pin
Heath Stewart25-May-04 9:43
protectorHeath Stewart25-May-04 9:43 
This has been asked many times in this forum. The answer is to P/Invoke SendInput. See http://pinvoke.net/default.aspx/user32.SendInput[^] for the method signature. This sends the input to the foreground window. If you have simple input you want to send (keyboard input only), you can use the SendKeys class, which also sends input to the foreground window.

This means that your application should switch the other application to the foreground before sending input. There are many ways of doing this, such as getting the processes using Process.GetProcessesByName, getting the MainWindowHandle, and pass that to a P/Invoke'd SetForegroundWindow (see http://www.pinvoke.net/default.aspx/user32.SetForegroundWindow[^]).

There are other ways but these deal with Windows messaging, something you should understand before trying to use. You can learn more about Windows messaging in the Platform SDK in the MSDN Library[^].

 

Microsoft MVP, Visual C#
My Articles
GeneralRe: Can I send mouse clicks to another application? Pin
ekolis25-May-04 15:05
ekolis25-May-04 15:05 
GeneralRe: Can I send mouse clicks to another application? Pin
Dave Kreskowiak25-May-04 17:14
mveDave Kreskowiak25-May-04 17:14 
GeneralRe: Can I send mouse clicks to another application? Pin
Heath Stewart26-May-04 2:57
protectorHeath Stewart26-May-04 2:57 
GeneralInterop with MSDev 6.0 running instanceS Pin
Eric Marchesin25-May-04 8:52
Eric Marchesin25-May-04 8:52 
GeneralRe: Interop with MSDev 6.0 running instanceS Pin
Heath Stewart25-May-04 10:36
protectorHeath Stewart25-May-04 10:36 
GeneralRe: Interop with MSDev 6.0 running instanceS Pin
Eric Marchesin25-May-04 11:15
Eric Marchesin25-May-04 11:15 
GeneralRe: Interop with MSDev 6.0 running instanceS Pin
Heath Stewart25-May-04 11:20
protectorHeath Stewart25-May-04 11:20 
GeneralRe: Interop with MSDev 6.0 running instanceS Pin
Eric Marchesin25-May-04 11:32
Eric Marchesin25-May-04 11:32 
GeneralRe: Interop with MSDev 6.0 running instanceS Pin
Heath Stewart25-May-04 12:21
protectorHeath Stewart25-May-04 12:21 
GeneralRe: Interop with MSDev 6.0 running instanceS Pin
Eric Marchesin25-May-04 12:32
Eric Marchesin25-May-04 12:32 
QuestionSoap extension with command line client? Pin
shining_star7725-May-04 8:51
shining_star7725-May-04 8:51 
AnswerRe: Soap extension with command line client? Pin
Heath Stewart25-May-04 9:37
protectorHeath Stewart25-May-04 9:37 
QuestionHow to use Pin
IamADotNetGuy25-May-04 7:57
IamADotNetGuy25-May-04 7:57 
AnswerRe: How to use Pin
Heath Stewart25-May-04 8:11
protectorHeath Stewart25-May-04 8:11 
GeneralRe: How to use Pin
IamADotNetGuy25-May-04 8:14
IamADotNetGuy25-May-04 8:14 
GeneralRe: How to use Pin
Heath Stewart25-May-04 8:18
protectorHeath Stewart25-May-04 8:18 
GeneralRe: How to use Pin
IamADotNetGuy25-May-04 8:22
IamADotNetGuy25-May-04 8:22 

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.