I am trying to use sendmessage of user32.dll in an embedded windows ce5.0 computer the same simple program that I made only for testing the user32 in embedded is working on my windows xp computer. the app and the dll are in the same folder.
the message I get when it is in win ce5.0 is : Can't find Pinvocke DLL 'user32.dll'
the code : (I find it in the web and used it to try the sendmessage)
private int SC_MONITORPOWER = 0xF170;
private int WM_SYSCOMMAND = 0x0112;
[DllImport("user32.dll")]
private static extern int SendMessage(int hWnd, int hMsg, int wParam, int lParam);
private void button3_Click(object sender, EventArgs e)
{
SendMessage(this.Handle.ToInt32(), WM_SYSCOMMAND, SC_MONITORPOWER, 2);
}
can anyone help me with this?