Всем привет. У меня следующая проблема: я пытаюсь имитировать перемещение курсора, клики и ввод текста в приложениях гостевой системы (XP) при помощи C#. С перемещением курсора и кликами все получается. Но когда я пытаюсь ввести текст в окно ввода, приложение никак не реагирует. Если я делаю все то же самое в приложении хоста (7) - все удачно. Я хочу узнать, были ли у кого-нибудь похожие проблемы и, возможно, есть ли идеи в чем может быть ее причина.
Вот объявление функции, которую я использую. Я взял это из библиотеки перехвата событий, которую я скачал.
[DllImport("user32.dll")]
public static extern void keybd_event(Keys bVk, byte bScan, UInt32 dwFlags, IntPtr dwExtraInfo);
Есть еще один известный мне способ имитации при помощи класса C# SendKeys. Но он так же не работает.
Спасибо.
-----------
Hello. I have the following problem: I'm trying to simulate the movement of the cursor, clicks and typing in hosted system (XP) applications using C #. With the movement of the cursor and clicks all turns out. But when I try to enter text in the input window, the application does not respond. If I'm doing the same thing in the host (7) applications - all successfully. I want to find out if anyone has similar problems, and perhaps there is the idea of what could be the cause.
Here is the function declaration, which I use. I took it out of the library interception of events which I downloaded.
[DllImport ("user32.dll")]
public static extern void keybd_event (Keys bVk, byte bScan, UInt32 dwFlags, IntPtr dwExtraInfo);
Is there another way I know to simulate using a SendKeys class. But it also does not work.
Thank you.