Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- FreshWin (c) Fresh Technologies - <b>wresize() window function</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
  WRESIZE()                                                  Window Function
 Purpose..: Resize a window on the screen
-------------------------------------------------------------------------------
 Syntax...: wReSize() --> lSuccess

 Arguments: none. You must use the function on the window in focus.

 Returns..: lSuccess is TRUE, if successful

 Remark...: wReSize() changes the size of a window using the
            down and/or the right arrow keys or the mouse if the
            proper style choice is made when using wNew(). The window
            will move towards the bottom or the right of the screen.
            To complete the size change, press Enter. If the window is closed
            and then re-opened later, it will open where it was
            closed.  Anything on display in the window will be re-sized
            to fit, if at all possible.

            When re-sizing a window, we use frames and borders made
            up of Chr( 250 ), a dot, to let the user know that they are
            in RESIZING mode. Of course, if it is the window icon,
            no re-sizing is done.

            The function can be used with a mouse. The mouse cursor must
            be positioned on the bottom left corner of the window,
            clicked on, held down and the window will follow the cursor.

            If the window was defined with either WS_CUA or WS_SIZE,
            the window can be resized in an event driven manner
            during MsInkey() ( FreshWin's INKEY() replacement ) by
            using hot-keys or clicking on the resize character with
            the mouse.

 Source...: WRESIZE.PRG
-------------------------------------------------------------------------------
 Example..: .  The example waits for the use of down or right
               arrow keys to change the size and Enter to fix
               the window in that spot.

            wReSize()

 Note.....: Should you press Escape during mid-resize, the original
            corners will be restored.

           .  The example uses wReSize() in conjunction with
              others to resize the window to half its' width
              if F10 is pressed.

            wOpen( "Bill" )
            ...
            if lastkey() == K_F10
               wReSize()
               keyboard replicate( chr(K_RIGHT), wWidth( "Bill" ) / 2)
            endif

           .  This example uses MsInkey() to resize a window at
              the users discretion. Note that the window must be
              created with either WS_SIZE or WS_CUA for this to work.

           wOpen( "Bill" )
           while wIsActive() .and. !wIsMin()
              MsInkey(0)
           enddo

See Also: wMove() wShift() wZoom() wChgSize()

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson