Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
LockScreen in C#
Message
General information
Forum:
ASP.NET
Category:
Coding, syntax and commands
Miscellaneous
Thread ID:
01410371
Message ID:
01410476
Views:
61
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
Previous
Reply
Map
View

Click here to load this message in the networking platform