yunxizfj

等待...

导航

通过代码实现 Windows Mobile 窗体的最小化 (转)

//using System.Runtime.InteropServices;

[DllImport(
"coredll")]
private static extern bool ShowWindow(IntPtr hwnd, int nCmdShow);
private const int SW_MINIMIZE = 6;

private void mniHide_Click(object sender, EventArgs e)
{
    // 隐藏窗体,可以通过重新运行程序来显示窗体
    
ShowWindow(this.Handle, SW_MINIMIZE);
}

private void mniExit_Click(object sender, EventArgs e)
{
    // 关闭窗体,窗体对象将会被销毁
    
this.Close();
}

posted on 2008-05-22 17:42  yunxizfj  阅读(553)  评论(3编辑  收藏  举报