Skip to content

Instantly share code, notes, and snippets.

@millsy
millsy / winproc prevent move
Created March 27, 2012 12:52
Prevent Move, Minimise and Maximise of Window
protected override void WndProc(ref Message message)
{
const int WM_SYSCOMMAND = 0x0112;
const int SC_MOVE = 0xF010;
const int SC_MAXIMIZE = 0xF030;
const int SC_MINIMIZE = 0xF020;
const int SC_RESTORE = 0xF120;
switch (message.Msg)
{