METRO with visible taskbar ?

METRO with visible taskbar ?

Postby ukoenig » 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 >

Image

with a NORMAL window that works :

Code: Select all  Expand view

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
ukoenig
 
Posts: 4043
Joined: Wed Dec 19, 2007 6:40 pm
Location: Germany

Re: METRO with visible taskbar ?

Postby Antonio Linares » Mon Jun 26, 2017 6:41 am

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

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 41205
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: METRO with visible taskbar ?

Postby ukoenig » Sun Jul 02, 2017 8: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()

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
ukoenig
 
Posts: 4043
Joined: Wed Dec 19, 2007 6:40 pm
Location: Germany

Re: METRO with visible taskbar ?

Postby MarioG » 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()

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

Re: METRO with visible taskbar ?

Postby ukoenig » Wed Jul 24, 2019 6: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.
User avatar
ukoenig
 
Posts: 4043
Joined: Wed Dec 19, 2007 6:40 pm
Location: Germany

Re: METRO with visible taskbar ?

Postby MarioG » Thu Jul 25, 2019 1:28 am

:oops:
Many Thanks! now is Ok
Resistencia - "Ciudad de las Esculturas"
Chaco - Argentina
User avatar
MarioG
 
Posts: 1380
Joined: Fri Oct 14, 2005 1:28 pm
Location: Resistencia - Chaco - AR


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: karinha and 15 guests