Hello,
Im using LowLevelMouseProc to capture the mouse outside the form. If I hold the left mouse button and i move the pointer on the desktop, a shaded area appears. the color varies according to windows options. is there a way to programatically disable that color from appearing?
my goal is to capture the print screen between the two mouse coordinates(first point is on mouse down, and second point is on mouse up). therefore my images appear shaded. below is my code to make my point clear:
IntPtr LowLevelMouseProc(int nCode, uint wParam, IntPtr lParam)
{
p = Cursor.Position;
if (wParam == WM_LBUTTONDOWN)
{
P1 = p;
if (ModifierKeys == Keys.Alt)
{
CursorChange = true;
IntPtr cursor = Cursors.Cross.Handle;
bool ret_val = SetSystemCursor(cursor, OCR_NORMAL);
}
}
else if (wParam == WM_LBUTTONUP)
{
if (CursorChange)
{
IntPtr cursor = Cursors.Cross.Handle;
bool ret_val = SetSystemCursor(cursor, OCR_NORMAL);
}
CursorChange = false;
P2 = p;
if (ModifierKeys == Keys.Alt)
try
{
CaptureFcn();
}
catch (Exception ex)
{
MessageBox.Show(ex.Message);
}
}
CaptureFcn() captures the image between points p1 and p2.
thanks for your help.

0 answers