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);
}

2 comments:

Eternal guru said...

Thanks
Thanks i was looking for it. Now i will update it and use it in my project.

But can you tell anything about this without using API with C# only

Manas said...

But the problem is that i am unable to get the methods available in DLL.
How to get the DLL methods ?