FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour Info about if Window width or height is resized ?
Posts: 4043
Joined: Wed Dec 19, 2007 06:40 PM
Info about if Window width or height is resized ?
Posted: Tue May 07, 2019 09:55 AM
Hello,

somebody asked for a solution to zoom / unzoom objects
inside a panel on window resize.

I got it working ( some calculations are needed )
To make it shorter is there a information if windows
height or width is resized ?
For the moment I check the window-sizes ( width and height )
against each other after a resize to calculate the needed object resize / zoom-factor.

The image shows the result after the window hight is resized.



regards
Uwe :-)
Since 1995 ( the first release of FW 1.9 )

i work with FW.

If you have any questions about special functions, maybe i can help.
Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
Re: Info about if Window width or height is resized ?
Posted: Wed May 08, 2019 02:04 AM


Code (fw): Select all Collapse
func test()

   local oWnd, aBmp

   DEFINE WINDOW oWnd

   aBmp  := oWnd:ReadImage( "c:\fwh\bitmaps\pngs\2.png" )
   oWnd:bPainted := { || oWnd:DrawImage( aBmp, { 0.1, 0.05, 0.5, 0.45 } ) }

   ACTIVATE WINDOW oWnd CENTERED

   PalBmpFree( aBmp )

return nil
Regards



G. N. Rao.

Hyderabad, India
Posts: 4043
Joined: Wed Dec 19, 2007 06:40 PM
Re: Info about if Window width or height is resized ?
Posted: Mon May 13, 2019 03:28 PM

Mr. Rao,

the solution I've been looking for to resize multiple images on window-resize

viewtopic.php?f=3t=37133p=221876#p221876

regards
Uwe :D

&&

Since 1995 ( the first release of FW 1.9 )

i work with FW.

If you have any questions about special functions, maybe i can help.
Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
Re: Info about if Window width or height is resized ?
Posted: Mon May 13, 2019 04:07 PM
Multiple Images:
Code (fw): Select all Collapse
function TempTest()

   local oWnd, aOlga, aSea

   DEFINE WINDOW oWnd

   aOlga := oWnd:ReadImage( "c:\fwh\bitmaps\olga1.jpg" )
   aSea  := oWnd:ReadImage( "c:\fwh\bitmaps\sea.bmp" )

   oWnd:bPainted  := <|hDC|
      oWnd:DrawImage( aOlga, { 0.05, 0.10, 0.50, 0.45 } )
      oWnd:DrawImage( aOlga, { 0.05, 0.55, 0.50, 0.90 } )
      oWnd:DrawImage( aSea,  { 0.50, 0.16, 0.99, 0.83 } )
      return nil
      >

   ACTIVATE WINDOW oWnd CENTERED

   PalBmpFree( aOlga )
   PalBmpFree( aSea )

return nil
Regards



G. N. Rao.

Hyderabad, India

Continue the discussion