running c++ console app in c#


hello,

i have c++ console app.exe want run using c# gui. c++ app executes functions on key press ( f1, f2, f3)

i tried designing gui c# , using code/ideas found on stackoverflow far not working. want able press ( f1, f2, f3) on c# app , simulate in c++ running in background.

thanks help,

al

hi,

based on current description, let me list need do.

1. start console application in c# gui.

2. monitor key events in c# application, when f1 f6 hit, should pass input console application.

for first step, can start console application using process class in .net.

for second step, think idea christopher provided worth trying. in thread.

http://stackoverflow.com/questions/6760341/control-console-application-from-windows-form-application-c-sharp

when key press events triggered, can redirect input console application.

if did not work, at https://msdn.microsoft.com/en-us/library/ms171548.aspx in the section "to send keystroke different application".

anyway, don't quite understand want do, if want call functions, simple. if want control console application, may need simulate technic or windows api.

you can go

http://stackoverflow.com/questions/1134993/control-another-application-using-c-sharp

https://social.msdn.microsoft.com/forums/en-us/e1ea7074-fb9f-4429-8c7c-51c6f6c76deb/controlling-another-program-with-c?forum=csharplanguage

best regards,

kristin


we trying better understand customer views on social support experience, participation in interview project appreciated if have time. helping make community forums great place.
click here participate survey.



Visual Studio Languages  ,  .NET Framework  >  Visual C#



Comments

Popular posts from this blog

Azure DocumentDB Owner resource does not exist

job syspolicy_purge_history job fail in sqlserver 2008

Trying to register with public marketplace error with 'Get-AzureStackStampInformation'