Click here to Skip to main content
15,909,530 members
Home / Discussions / C#
   

C#

 
GeneralRe: Forms Pin
Anonymous25-May-04 18:44
Anonymous25-May-04 18:44 
General[Message Deleted] Pin
ProductShowcase25-May-04 17:02
ProductShowcase25-May-04 17:02 
GeneralRe: Is there an #define for the compiler version? Pin
Anthony_Yio25-May-04 20:47
Anthony_Yio25-May-04 20:47 
GeneralRe: Is there an #define for the compiler version? Pin
Dave Kreskowiak26-May-04 2:57
mveDave Kreskowiak26-May-04 2:57 
GeneralRe: Is there an #define for the compiler version? Pin
Marc Clifton26-May-04 3:25
mvaMarc Clifton26-May-04 3:25 
GeneralRe: Is there an #define for the compiler version? Pin
Heath Stewart26-May-04 4:23
protectorHeath Stewart26-May-04 4:23 
GeneralTooltips Pin
Joel Holdsworth25-May-04 10:11
Joel Holdsworth25-May-04 10:11 
GeneralRe: Tooltips Pin
Heath Stewart25-May-04 10:37
protectorHeath Stewart25-May-04 10:37 
GeneralRe: Tooltips Pin
Heath Stewart25-May-04 11:25
protectorHeath Stewart25-May-04 11:25 
Generaladding dataset to webform generating error Pin
DeSonny25-May-04 10:00
DeSonny25-May-04 10:00 
GeneralWrite DataGrid to file. Pin
Jason Weibel25-May-04 9:28
Jason Weibel25-May-04 9:28 
GeneralRe: Write DataGrid to file. Pin
Heath Stewart25-May-04 9:57
protectorHeath Stewart25-May-04 9:57 
GeneralWisdom of deriving a control from Panel Pin
Joel Holdsworth25-May-04 9:08
Joel Holdsworth25-May-04 9:08 
GeneralRe: Wisdom of deriving a control from Panel Pin
ekolis25-May-04 9:19
ekolis25-May-04 9:19 
Generalhmm Pin
Joel Holdsworth25-May-04 9:51
Joel Holdsworth25-May-04 9:51 
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 

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.