Hello
[DllImport("user 32.dll")]
private static extern int GetSystemMenu(i nt hwnd, int revert);
[DllImport("user 32.dll")]
private static extern int GetMenuItemCoun t(int menu);
[DllImport("user 32.dll")]
private static extern int RemoveMenu(int menu, int position, int flags);
protected void DisableCloseBut ton()
{
int menu = GetSystemMenu(H andle.ToInt32() , 0);
int count = GetMenuItemCoun t(menu);
RemoveMenu(menu , count - 1, MF_DISABLED | MF_BYPOSITION);
}
Aleksandar
"Saurabh Sharma" <sa***********@ yahoo.com> wrote in message
news:%2******** ********@tk2msf tngp13.phx.gbl. ..
Hi
How do i disable windows close button in forms in C#
Regards
Saurabh