我想请教各位的是:窗体上的关闭按钮怎样才能去掉或者让其灰显?

解决方案 »

  1.   

    先使用GetSystemMenu 
    看下面一段关于GetSystemMenu的说明,注意SC_CLOSE
    然后可以使用EnableMenuItem////////////////////////////
    ResAny window that does not use the GetSystemMenu function to make its own copy of the window menu receives the standard 
    window menu. 
    The window menu initially contains items with various identifier values, such as SC_CLOSE, SC_MOVE, and SC_SIZE. 
    Menu items on the window menu send WM_SYSCOMMAND messages. 
      

  2.   

    两个都是Windows API,不清楚用法,查一下MSDN
      

  3.   

    SetClassLong(Handle,GCL_STYLE,GetClassLong(Handle,GCL_STYLE)|CS_NOCLOSE);
    this->RecreateWnd();
      

  4.   

    form的bordericons中的bisystemmenu设置成false