amir_civil
یک شنبه 14 خرداد 1385, 18:42 عصر
سلام دوستان
کسی میتونه یه مثال از کاربرد دستورهای زیر در سی# بزنه
FindWindow....ShowWindow
ممنون
محمد میرمصطفی
سه شنبه 16 خرداد 1385, 15:36 عصر
class
NativeMethods
{
public const int SW_ERASE = 4;
public const int SW_HIDE = 0;
public const int SW_INVALIDATE = 2;
public const int SW_MAX = 10;
public const int SW_MAXIMIZE = 3;
public const int SW_MINIMIZE = 6;
public const int SW_NORMAL = 1;
public const int SW_RESTORE = 9;
public const int SW_SCROLLCHILDREN = 1;
public const int SW_SHOW = 5;
public const int SW_SHOWMAXIMIZED = 3;
public const int SW_SHOWMINIMIZED = 2;
public const int SW_SHOWMINNOACTIVE = 7;
public const int SW_SHOWNA = 8;
public const int SW_SHOWNOACTIVATE = 4;
public const int SW_SMOOTHSCROLL = 0x10;
}
classProgram
{
[
DllImport("user32.dll")]
private static extern bool ShowWindow(IntPtr hWnd, int nCmdShow);
[
DllImport("user32.dll")]
private static extern IntPtr FindWindow(string className, string text);
static void Main(string[] args)
{
Thread.Sleep(1000);
ShowWindow(FindWindow(null, Console.Title), NativeMethods.SW_HIDE);
Thread.Sleep(5000);
ShowWindow(FindWindow(null, Console.Title), NativeMethods.SW_SHOW);
Console.ReadKey();
}
}
Milad Mohseny
سه شنبه 16 خرداد 1385, 23:08 عصر
آقای محمد میرمصطفی ممنون ما هم از پاسخ استفاده کردیم .
amir_civil
چهارشنبه 17 خرداد 1385, 00:26 صبح
سلام
واقعا ممنون
vBulletin® v4.2.5, Copyright ©2000-1403, Jelsoft Enterprises Ltd.