Hi Mohammed,
here is the code
....
[DllImport("User 32.dll")] private static extern bool
SetForegroundWi ndow(IntPtr hWnd);
[DllImport("user 32.dll", CharSet=CharSet .Auto)]
static public extern IntPtr GetForegroundWi ndow();
[DllImport("user 32.dll")]
static extern void keybd_event(byt e bVk, byte bScan, uint dwFlags,
uint dwExtraInfo);
.....
private void SendCtrlC(IntPt r hWnd)
{
uint KEYEVENTF_KEYUP = 2;
byte VK_CONTROL = 0x11;
SetForegroundWi ndow(hWnd);
keybd_event(VK_ CONTROL,0,0,0);
keybd_event (0x43, 0, 0, 0 ); //Send the C key (43 is "C")
keybd_event (0x43, 0, KEYEVENTF_KEYUP , 0);
keybd_event (VK_CONTROL, 0, KEYEVENTF_KEYUP , 0);// 'Left Control Up
}
Regards,
Marcus
"Mohamoss" <mo************ @egdsc.microsof t.com> wrote in message
news:eT******** ******@cpmsftng xa10.phx.gbl...
HI Marcus
thaks for the reply , yes sure please share that so any one would make use
of it while encountraing the same situation
thanks again
Mohamed Mahfouz
MEA Developer Support Center
ITworx on behalf of Microsoft EMEA GTSC