FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour METRO with visible taskbar ?
Posts: 4043
Joined: Wed Dec 19, 2007 06:40 PM

METRO with visible taskbar ?

Posted: Sat Jun 24, 2017 10:08 AM
Hello,

I would like to show the original windows-taskbar on a METRO-window.
Is that possible ?
I tried with FWH-sample < metro.prg >



with a NORMAL window that works :

Code (fw): Select all Collapse
function task_bar_on(ison)

local hwnd 


    hwnd= FindWndByClass("Shell_TrayWnd", "")
    
    If ison 
        ShowWindow(hwnd,5)
    Else
        ShowWindow(hwnd,0)
    End If

return(NIL)

DLL32 Function ShowWindow(hwnd as LONG, nCmdShow as LONG) AS LONG ;
PASCAL FROM "ShowWindow" Lib "user32.dll"
    
DLL32 Function FindWndByClass(wndClass AS LPSTR,WndName as LPSTR) AS LONG ;
PASCAL FROM "FindWindowA" LIB "user32.dll"


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: 44162
Joined: Thu Oct 06, 2005 05:47 PM

Re: METRO with visible taskbar ?

Posted: Mon Jun 26, 2017 06:41 AM

You may modify the Class TMetro or change the created window style at runtime

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 4043
Joined: Wed Dec 19, 2007 06:40 PM

Re: METRO with visible taskbar ?

Posted: Sun Jul 02, 2017 08:20 AM
Antonio,

no changes needed, just a window adjustment ( NO window maximized )
If the slider is needed, just 1 line has to be changed

METHOD Paint() CLASS TMetroPanel
oRect:nTop := oRect:nBottom - SCRLB_HEIGHT
adjusted to
oRect:nTop := oRect:nBottom - SCRLB_HEIGHT - 40

The defined mainwindow

DEFINE WINDOW oMWnd TITLE cTitle FROM 0, 0 TO ScreenHeight() + 20, ScreenWidth() PIXEL ;
STYLE nOr( WS_POPUP );
COLOR CLR_WHITE, CLR_GREEN
oMetro := MakeMetroPanel( oMWnd )

DEFINE BRUSH oBrush FILE c_Path1 + "earth.bmp" RESIZE
oMetro:SetBrush( oBrush )
oBrush:End()

oMetro:bRClicked := { |r,c,f,o| msginfo( 'HWND' + NUMTOHEX( oMWnd:hWnd, 8 ) ) }

ACTIVATE WINDOW oMWnd ON INIT oMetro:Show()



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: 1380
Joined: Fri Oct 14, 2005 01:28 PM

Re: METRO with visible taskbar ?

Posted: Wed Jul 24, 2019 12:49 PM
ukoenig wrote:Antonio,

no changes needed, just a window adjustment ( NO window maximized )
If the slider is needed, just 1 line has to be changed

METHOD Paint() CLASS TMetroPanel
oRect:nTop := oRect:nBottom - SCRLB_HEIGHT
adjusted to
oRect:nTop := oRect:nBottom - SCRLB_HEIGHT - 40

The defined mainwindow

DEFINE WINDOW oMWnd TITLE cTitle FROM 0, 0 TO ScreenHeight() + 20, ScreenWidth() PIXEL ;
STYLE nOr( WS_POPUP );
COLOR CLR_WHITE, CLR_GREEN

oMetro := MakeMetroPanel( oMWnd )

DEFINE BRUSH oBrush FILE c_Path1 + "earth.bmp" RESIZE
oMetro:SetBrush( oBrush )
oBrush:End()

oMetro:bRClicked := { |r,c,f,o| msginfo( 'HWND' + NUMTOHEX( oMWnd:hWnd, 8 ) ) }

ACTIVATE WINDOW oMWnd ON INIT oMetro:Show()



regards
Uwe :-)


Hello Uwe
I do it your change: oRect:nTop := oRect:nBottom - SCRLB_HEIGHT - 40
but... look my image
what is the problem?
but... look my image. Not see the Taskbar

Resistencia - "Ciudad de las Esculturas"

Chaco - Argentina
Posts: 4043
Joined: Wed Dec 19, 2007 06:40 PM

Re: METRO with visible taskbar ?

Posted: Wed Jul 24, 2019 06:28 PM
Mario,
Can You try to adjust the window-height with ScreenHeight() :-)

ACTIVATE WINDOW oWnd MAXIMIZED ;
ON INIT ( oWnd:nHeight := ScreenHeight() , ; // ( + - )
BUILDMETRO(oWnd) )

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: 1380
Joined: Fri Oct 14, 2005 01:28 PM

Re: METRO with visible taskbar ?

Posted: Thu Jul 25, 2019 01:28 AM

Many Thanks! now is Ok

:oops:

Resistencia - "Ciudad de las Esculturas"

Chaco - Argentina

Continue the discussion