日期:2014-05-18  浏览次数:20768 次

开始菜单被隐藏,求解
private const int SW_HIDE = 0;

  [DllImport("user32.dll")]
  public static extern int FindWindow(string lpClassName, string lpWindowName);
  [DllImport("user32.dll")]
  public static extern int FindWindowEx(int hWnd1,int hWnd2,string lpsz1,string lpsz2);
  [DllImport("user32.dll")]
  public static extern int ShowWindow(int hWnd, int nCmdShow);
  private void button1_Click(object sender, EventArgs e)
  {
  ShowWindow(FindWindowEx(FindWindow("Shell_TrayWnd", null),0, "Button", null), SW_HIDE);
  }


本人用以上代码隐藏了开始。求解


------解决方案--------------------
探讨
引用:
ShowWindow(FindWindowEx(FindWindow("Shell_TrayWnd", null),0, "Button", null), 1);
- -.
解释解释、、

------解决方案--------------------
这是在 WinUser.h 里定义的
C/C++ code
#define SW_HIDE             0
#define SW_SHOWNORMAL       1
#define SW_NORMAL           1
#define SW_SHOWMINIMIZED    2
#define SW_SHOWMAXIMIZED    3
#define SW_MAXIMIZE         3
#define SW_SHOWNOACTIVATE   4
#define SW_SHOW             5
#define SW_MINIMIZE         6
#define SW_SHOWMINNOACTIVE  7
#define SW_SHOWNA           8
#define SW_RESTORE          9
#define SW_SHOWDEFAULT      10
#define SW_FORCEMINIMIZE    11
#define SW_MAX              11