In this application I can drag the window from everywhere on the red zone.
Does someone know how to do this?
Thanks in advance
Otto
#include "FiveWin.ch"
function Main()
local oWnd, nRowPos, nColPos, lDrag := .F.
DEFINE WINDOW oWnd STYLE WS_POPUP COLOR "W/R"
oWnd:bLClicked := { | nRow, nCol | nRowPos := nRow, nColPos := nCol, lDrag := .T. }
oWnd:bMMoved = { | nRow, nCol | If( lDrag, oWnd:Move( oWnd:nTop + nRow - nRowPos,;
oWnd:nLeft + nCol - nColPos ),) }
oWnd:bLButtonUp := { || lDrag := .F. }
ACTIVATE WINDOW oWnd
return nil
#include "FiveWin.ch"
#include "InKey.ch"
#include "xbrowse.ch"
static nTop:=0
//----------------------------------------------------------------------------//
function Main()
local oWnd, oBar
DEFINE WINDOW oWnd MDI ;
TITLE "Küchenmeister"
DEFINE BUTTONBAR oBar 3D OF oWnd
DEFINE BUTTON OF oBar ACTION CustomerBrowse()
// SET MESSAGE OF oWnd TO "FiveWin xBase power!" CENTERED
ACTIVATE WINDOW oWnd MAXIMIZED
return nil
//----------------------------------------------------------------------------//
function CustomerBrowse()
local oWnd, oBrw
local cAlias
local nRowPos, nColPos, lDrag := .F.
USE Customer NEW ALIAS ( cAlias := GetNewAlias( "CUST" ) ) SHARED
DEFINE WINDOW oWnd MDICHILD TITLE Alias() // WS_POPUP COLOR "W/R"
oBrw := TXBrowse():New( oWnd )
oBrw:nMarqueeStyle := MARQSTYLE_HIGHLROW
oBrw:nColDividerStyle := LINESTYLE_BLACK
oBrw:lColDividerComplete := .t.
oBrw:SetRDD()
oBrw:CreateFromCode()
// oWndChild:oClient := oBrw
oWnd:bLClicked := { | nRow, nCol | nRowPos := nRow, nColPos := nCol, lDrag := .T. }
oWnd:bMMoved = { | nRow, nCol | If( lDrag, oWnd:Move( oWnd:nTop + nRow - nRowPos,;
oWnd:nLeft + nCol - nColPos,,, .T. ),) }
oWnd:bLButtonUp := { || lDrag := .F. }
ACTIVATE WINDOW oWnd ON INIT (oWnd:nLeft(320),oWnd:nTop(nTop*20),oWnd:nWidth(250), oBrw:SetFocus())
return nil
//----------------------------------------------------------------------------//
function GetNewAlias( cDbfName )
static n := 0
nTop:=n
return cDbfName + StrZero( ++n, 2 )
//----------------------------------------------------------------------------//
Return to FiveWin for Harbour/xHarbour
Users browsing this forum: nageswaragunupudi and 96 guests