Limit resizing a window and sizing controls on a window


i need to know how i can limit resizing of a window and when resizing the window, also some controls resize too.

Does anyone know where i can find information about the event (pbm_xxx) listed in the event id box? What means all this events?

Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

You have to write scripts in 2 events on your window. limit resizing of your window.
you have to new user event.
event name: getminmaxinfo (long minmaxinfo)
event id: pbm_getminmaxinfo

this event has only one long argument for setting min-size, max-size of your window that you allow user to resize.

the problem is minmaxinfo a structure but pb cast it to long(pointer to memory). you need a trick to set these values in this long.

here are structures to be used for this event:
str_POINTAPI        ptReserved
str_POINTAPI        ptMaxSize
str_POINTAPI        ptMaxPosition
str_POINTAPI        ptMinTrackSize
str_POINTAPI        ptMaxTrackSize

    long x
    long y

I see 2 styles of programming to manage this long argument.
-1.make a DLL to set this value for you. see my demo stuff.

-2.use only powerscript, eric's stuff. you will see more information and download demo here.

2.for resizing your controls in that window.
pb already define this event.
event name: resize(sizetype, newwidth, newheight)
event id: pbm_resize

in this event you should to choose-case
if sizetype is
0 — (SIZE_RESTORED) ... resize your controls
1 — (SIZE_MINIMIZED) .... you should not resize your controls for this case.
2 — (SIZE_MAXIMIZED) ... resize your controls
3 — (SIZE_MAXSHOW) ... resize your controls
4 — (SIZE_MAXHIDE)  .... you should not resize your controls for this case.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Editors IDEs

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.