M
Mark Overstreet
I am trying to click a button in another window and I have it's hWnd
value so I was trying to use Send message. Here is my code but it
doesn't work as expected...
response = Win32API.SendMessage(hWndYesButton,Win32API.BM_SETSTATE,0,null);
response = Win32API.SendMessage(hWndYesButton,Win32API.WM_LBUTTONDOWN,1,"11");
response = Win32API.SendMessage(hWndYesButton,Win32API.WM_LBUTTONDOWN,1,null);
response = Win32API.SendMessage(hWndYesButton,Win32API.WM_LBUTTONUP,0,null);
response = Win32API.SendMessage(hWndYesButton,Win32API.BM_SETSTATE,1,null);
response = Win32API.SendMessage(hWndYesButton,Win32API.BM_SETSTATE,0,null);
Can someone give me an example in C# that works! I would certainly
appreciate it as this is driving me crazy because all it does is press
the button but fails to fire the click event so that window actually
closes!
Thanks
Mark
value so I was trying to use Send message. Here is my code but it
doesn't work as expected...
response = Win32API.SendMessage(hWndYesButton,Win32API.BM_SETSTATE,0,null);
response = Win32API.SendMessage(hWndYesButton,Win32API.WM_LBUTTONDOWN,1,"11");
response = Win32API.SendMessage(hWndYesButton,Win32API.WM_LBUTTONDOWN,1,null);
response = Win32API.SendMessage(hWndYesButton,Win32API.WM_LBUTTONUP,0,null);
response = Win32API.SendMessage(hWndYesButton,Win32API.BM_SETSTATE,1,null);
response = Win32API.SendMessage(hWndYesButton,Win32API.BM_SETSTATE,0,null);
Can someone give me an example in C# that works! I would certainly
appreciate it as this is driving me crazy because all it does is press
the button but fails to fire the click event so that window actually
closes!
Thanks
Mark