FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour Resizing the window
Posts: 1392
Joined: Mon May 14, 2007 09:49 AM

Resizing the window

Posted: Sat Jun 11, 2022 06:40 PM

Hi,

There is a window (TWindow) in the style (WS_BORDER, WS_MINIMIZEBOX, WS_SYSMENU), I need to prohibit moving the window borders with the mouse (resizing the window). How to do it ?

Posts: 1344
Joined: Wed Nov 16, 2005 09:14 PM

Re: Resizing the window

Posted: Sun Jun 12, 2022 01:07 AM
Code (fw): Select all Collapse
#include "Fivewin.ch"
static  nW, nH
function Main()
local oWnd

DEFINE WINDOW oWnd TITLE "No resize" ;
          NOZOOM FROM 05,05 TO 20,60
nW := oWnd:nWidth 
nH := oWnd:nHeight
oWnd:bResized := { || NoResize(oWnd) }
ACTIVATE WINDOW oWnd   

static function NoResize(oWnd)
oWnd:SetSize(nW, nH)
oWnd:Refresh()
return nil
Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM

Re: Resizing the window

Posted: Sun Jun 12, 2022 04:39 AM
Please also try:
Code (fw): Select all Collapse
#include "fivewin.ch"

function Main()

   local oWnd

   DEFINE WINDOW oWnd NOZOOM NOMINIMIZE FROM 0,0 TO 400,600 PIXEL

   oWnd:aMinMaxInfo := { nil, nil, nil, nil, 600, 400, 600, 400 }

   ACTIVATE WINDOW oWnd CENTERED

return nil
Regards



G. N. Rao.

Hyderabad, India
Posts: 1392
Joined: Mon May 14, 2007 09:49 AM

Re: Resizing the window

Posted: Sun Jun 12, 2022 06:33 AM

Thanks !

Posts: 1392
Joined: Mon May 14, 2007 09:49 AM

Re: Resizing the window

Posted: Tue Jun 14, 2022 08:52 PM

Is it possible to make a TWindow without caption and sysmenu (WS_POPUP) and a frame so that it can be stretched with the mouse ?

Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM

Re: Resizing the window

Posted: Wed Jun 15, 2022 08:47 AM
Code (fw): Select all Collapse
   DEFINE WINDOW oWnd STYLE WS_THICKFRAME FROM 0,0 TO 400,600 PIXEL
   oWnd:bRClicked := { || oWnd:End() }
   ACTIVATE WINDOW oWnd CENTERED
Regards



G. N. Rao.

Hyderabad, India
Posts: 1392
Joined: Mon May 14, 2007 09:49 AM

Re: Resizing the window

Posted: Wed Jun 15, 2022 09:03 AM

Yes, the WS_THICKFRAME style is suitable, only the frame turns out to be wide and not beautiful :(

Continue the discussion