I want to send enter command to another application via c# 4.0 win forms. How can i do that ? The commands will be sent inside vmware virtual pc win xp sp3

thank you

有帮助吗?

解决方案

Your question was a little light on detail, so we might need more information to answer your question fully. For example, you mention that the program will be running in a virtual pc via VMWare. Does this mean that you wish the command to be sent to an application running on another PC? IF that is the case, you probably want to look at creating some sort of service, with a listener that intercepts messages via an IP port. There are lots of 3rd party tools and components that could help you there if you do a little research.

If you mean that you will have two apps running on the same system, perhaps you could use windows messaging.

In each of these cases, your app would then need to intercept some sort of message that your app would interpret as a keypress, either by triggering a component keypress in your app, or simply invoking your component's Onkeypress handler for the Enter Key.

I'd be able to provide a more detailed answer if I knew more about what it was you were specifically trying to do.

其他提示

Perhaps ManagedSpy would provide the functionality you need for a WinForms app.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top