METRO with visible taskbar ?

Post Reply
User avatar
ukoenig
Posts: 3981
Joined: Wed Dec 19, 2007 6:40 pm
Location: Germany
Contact:

METRO with visible taskbar ?

Post by ukoenig »

Hello,

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

Image

with a NORMAL window that works :

Code: Select all

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.
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Re: METRO with visible taskbar ?

Post by Antonio Linares »

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

Antonio Linares
www.fivetechsoft.com
User avatar
ukoenig
Posts: 3981
Joined: Wed Dec 19, 2007 6:40 pm
Location: Germany
Contact:

Re: METRO with visible taskbar ?

Post by ukoenig »

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()

Image

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.
User avatar
MarioG
Posts: 1356
Joined: Fri Oct 14, 2005 1:28 pm
Location: Resistencia - Chaco - AR

Re: METRO with visible taskbar ?

Post by MarioG »

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()

Image

regards
Uwe :D
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

Image
Resistencia - "Ciudad de las Esculturas"
Chaco - Argentina
User avatar
ukoenig
Posts: 3981
Joined: Wed Dec 19, 2007 6:40 pm
Location: Germany
Contact:

Re: METRO with visible taskbar ?

Post by ukoenig »

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.
User avatar
MarioG
Posts: 1356
Joined: Fri Oct 14, 2005 1:28 pm
Location: Resistencia - Chaco - AR

Re: METRO with visible taskbar ?

Post by MarioG »

:oops:
Many Thanks! now is Ok
Resistencia - "Ciudad de las Esculturas"
Chaco - Argentina
Post Reply