在FormCreate加入:
HWND hSysMenu;LONG dw;Form1->Height =80; Form1->Width = 250;Form1->Left = Screen->Width/2;Form1->Top =Screen->Height/3;hSysMenu=GetSystemMenu(Form1->WindowHandle,0);RemoveMenu(hSysMenu, 4, 0x400);//取消系统菜单最大化dw=GetWindowLong(Form1->WindowHandle, -16); //Window styledw=dw&0xFFFEFFFF; //Turn off Maximize buttonSetWindowLong(Form1->WindowHandle, -16, dw);
MSDN中有一篇VB的文章.
本人把它转为BCB