I have a remote desktop application in which I want to make one of the windows to stop redrawing while it's loading and then to restart the drawing.
I was thinking a C# dll project would work but I'm having trouble finding a C# example of this API call.
I don't have a real good understanding of using and making a .dll that can work in another application. I'm not 100% sure that this is even the correct API to do what I need. I would also like to find a tutorial, article, book that explains the whole process. That being, Find API, build c# .dll, use the dll in another app, etc.
I posted a similar question on Stack Overflow but they rejected my question without an explanation. So I'm going to try here.
Thanks,
Jeff
I was thinking a C# dll project would work but I'm having trouble finding a C# example of this API call.
C#:
class DrawingControl
{
[DllImport("user32.dll")]
public static extern int SendMessage(IntPtr hWnd, Int32 wMsg, bool wParam, Int32 lParam);
private const int WM_SETREDRAW = 11;
public static void SuspendDrawing( Control parent )
{
SendMessage(parent.Handle, WM_SETREDRAW, false, 0);
}
public static void ResumeDrawing( Control parent )
{
SendMessage(parent.Handle, WM_SETREDRAW, true, 0);
parent.Refresh();
}
}
I don't have a real good understanding of using and making a .dll that can work in another application. I'm not 100% sure that this is even the correct API to do what I need. I would also like to find a tutorial, article, book that explains the whole process. That being, Find API, build c# .dll, use the dll in another app, etc.
I posted a similar question on Stack Overflow but they rejected my question without an explanation. So I'm going to try here.
Thanks,
Jeff