I'm attemping to create an automated process for closing a particular Dialog Box which pops up when an application crashes.
Basically a message box appears: "Start in Safe Mod?" [Yes] [No] [Cancel]
I have created an API that can close that dialog box but that won't work. I need it to actualy send a key N or click on the NO button.
(I'm still a bit novice with Windows API)
The code below closes it.
I tried to use WN_KEYDOWN / WM_KEYUP /WM_CHAR but nothing happen. :( I guess it wasn't as simple as that. Anyone know what I need to do? Like find the button handle? any way of searching for all the button handle ids?
NativeWIN32.SendMessage(hwnd, NativeWIN32.WM_SYSCOMMAND, NativeWIN32.SC_CLOSE, 1); // Works
NativeWIN32.SendMessage(hwnd, NativeWIN32.WM_CHAR, Convert.ToInt32('n'), 1); // Doesn't work