Hi Kevin,
>but this is foreign to me. I'm not even sure what this does or where to put it.
This code is the C# equivalent of a DECLARE DLL and a #DEFINE line in VFP. There are two possible places to put this code: You could create a class Win32 or Native, or something similar in which you collect all API declarations. In this case you need to change the visibility of the constant from private to public Then use something like:
Win32.SendMessage(...);
or you place the line in the class that uses this:
class SomeClass
{
[DllImport("user32.dll")]
public static extern int SendMessage(IntPtr hWnd, Int32 wMsg, bool wParam, Int32 lParam);
private const int WM_SETREDRAW = 11;
public void MyMethod()
{
SendMessage(...);
}
}
--
Christof