1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32
| using System;
using System.Runtime.InteropServices;
namespace ConsoleApplication1
{
/// <summary>
/// Summary description for Class1.
/// </summary>
class Class1
{
const int SW_SHOW = 5;
const int SW_HIDE = 0;
[DllImport("user32.dll")]
static extern bool ShowWindow(IntPtr hWnd, int nCmdShow);
/// <summary>
/// The main entry point for the application.
/// </summary>
[STAThread]
static void Main(string[] args)
{
//
// TODO: Add code to start application here
//
//avec ton Process objprocess
ShowWindow(objprocess.MainWindowHandle, SW_SHOW);
ShowWindow(objprocess.MainWindowHandle, SW_HIDE);
}
}
} |
Partager