C# Desktop Working Area

  • Thread starter Thread starter pocketbin
  • Start date Start date
P

pocketbin

Hello,

How can I make my app stay in the desktop working area? I don't want
the users to be able to hide part of the app by dragging it away.

Thanks
 
The simplest way of doing this is to maximize your application. Beside this
there is no other automatic solution AFAIK.

If you want to handle it your self you can hook on the Move event and adjust
the position of the window once the user stop moving it.
 
Yesm I just answered this question for some other poster. I'll copy paste my
answer here as well

"
Catch WM_ENTERSIZEMOVE and WM_EXITSIZEMOVE windows messages. These are the
markers that Windows puts et the begining and at the end of the move/resize
modal loop.
"

To process windows message override form's WndProc virtual method.

The integer constands of these messages are:
WM_ENTERSIZEMOVE 0x0231
WM_EXITSIZEMOVE 0x0232
 
Back
Top