Sunday, May 20, 2007

How to import a dll in c#

[DllImport("user32.dll")]
public static extern long ShowWindowAsync(IntPtr hWnd, IntPtr nCmdShow);


///
/// The main entry point for the application.
///

///

[STAThread]
static void Main(string[] Args)
{
ShowWindowAsync((IntPtr)RunningProcesses[0].MainWindowHandle, (IntPtr)1);
}