One can disable the resize of a window by changing its border style to one that does not support
resizing.
Here are two products that can edit the style of a window :
Window Detective
Winspector
I found Window Detective to be much more reactive than Winspector, although working with both is very similar.
Here is how I rendered notepad to be unresizable.
After launching Window Detective and notepad, click the "Pick window" button of Window Detective
and bring it over the notepad window. The notepad window is highlighted, but ensure that you chose the entire notepad window rather than only a sub-window such as the edit-text control.
Click to choose the notepad window. Window Detective will then display it in its Window list.
Right-click on it and choose "Edit Window Styles" :
![image1](../../I/static/images/77713389e00e4793f815538a0387bba6088c82bd2354674ec2e63faef59d49c9.jpg)
The following window is displayed :
![image2](../../I/static/images/0b60cd5b62fd51783964605da01c7bd41814ef81d76357e6fd954b6db2dc6603.jpg)
Uncheck the style called "WS_THICKFRAME" and click OK.
This is it - the border of notepad can no longer be resized.
Note : If Window Detective slows-down the display, close its Messages panel.
1the main problem is accidentally clicking and dragging on the title bar, accidentally clicking the restore button, etc. does it prevent those? the window doesn't even have resize handles in maximized mode – endolith – 2012-10-15T03:18:47.427
One can get rid of the min/max buttons by also unchecking WS_MINIMIZEBOX/WS_MAXIMIZEBOX. That should also get rid of the restore button, but render the window's size unchangeable. So better set the window to the right size (or maximized) before changing its style. – harrymc – 2012-10-15T07:00:38.140
That almost works, but I can still drag the title bar which is the same as "Restore" in Windows 7. WS_BORDER almost works by removing the title bar completely, but makes it overlap the taskbar when you restore from Desktop mode. Also this would have to be done each time I run it? – endolith – 2012-10-15T14:00:14.767
1
(1) For the title bar, maybe this link might help. (2) Be careful with turning off too many UI elements, but there's nothing wrong with trying it out. (3) Yes, this has to be done repetitively, but maybe you can automate it using a macro recorder such as AutoHotkey.
– harrymc – 2012-10-15T14:29:00.887