Limit resizing a window and sizing controls on a window

Posted on 2003-03-05
Medium Priority
Last Modified: 2013-12-26

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?

Question by:bluecomet
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment

Accepted Solution

buasuwan earned 400 total points
ID: 8072898
You have to write scripts in 2 events on your window.
1.to 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.

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Update (December 2011): Since this article was published, the things have changed for good for Android native developers. The Sequoyah Project (http://www.eclipse.org/sequoyah/) automates most of the tasks discussed in this article. You can even fin…
How to install Selenium IDE and loops for quick automated testing. Get Selenium IDE from http://seleniumhq.org Go to that link and select download selenium in the right hand column That will then direct you to their download page. From that p…
This tutorial covers a step-by-step guide to install VisualVM launcher in eclipse.
The viewer will learn how to use and create new code templates in NetBeans IDE 8.0 for Windows.
Suggested Courses

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question