Windows 8 Metro style - A Class TMetro test

Re: Windows 8 Metro style - A Class TMetro test

Postby Antonio Linares » Fri Sep 23, 2011 3:05 pm

Enhanced version:

metro2.prg
Code: Select all  Expand view
#include "FiveWin.ch"
#include "xbrowse.ch"

function Main()

   local oWnd, oFont, oBrw, oFont2
   local aItems := { "Personalize", "Users", "Wireless" }
   
   DEFINE FONT oFont NAME "Segoe UI Light" SIZE 0, -52    

   DEFINE FONT oFont2 NAME "Segoe UI Light" SIZE 0, -32    

   DEFINE WINDOW oWnd STYLE nOr( WS_POPUP, WS_VISIBLE ) ;
      COLOR RGB( 170, 170, 170 ), CLR_WHITE
     
   @ 2, 10 SAY "Control Panel" FONT oFont SIZE 300, 100
   
   @ 2, 80 SAY "Personalize" FONT oFont SIZE 300, 100
     
   @ 10, 7 XBROWSE oBrw ARRAY aItems COLSIZES 800 CELL ;
      FONT oFont2 SIZE 400, 650 NOBORDER OF oWnd
     
   oBrw:nDataLines = 2  
   oBrw:lRecordSelector = .F.
   oBrw:lHeader   = .F.
   oBrw:lHScroll  = .F.
   oBrw:lVScroll  = .F.
   oBrw:nStretchCol = 1
   oBrw:bClrStd = { || { RGB( 170, 170, 170 ), CLR_WHITE } }
   oBrw:bClrSelFocus = { || { CLR_WHITE, RGB( 34, 177, 76 ) } }
   oBrw:SetColor( "B/W*" )
   
   oBrw:CreateFromCode()
   oBrw:SetFocus()
   
   ACTIVATE WINDOW oWNd MAXIMIZED ;
      ON CLICK oWnd:End()
     
return nil        


Image
regards, saludos

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

Re: Windows 8 Metro style - A Class TMetro test

Postby norberto » Fri Sep 23, 2011 3:11 pm

Antonio, right, nice job.

Called from: => LEN(0)
Called from: BAR.prg => GRADIENTFILL(908)

thanks
norberto
 
Posts: 566
Joined: Thu Aug 30, 2007 3:40 pm
Location: BR

Re: Windows 8 Metro style - A Class TMetro test

Postby Antonio Linares » Fri Sep 23, 2011 5:16 pm

better... :-)

Image

metro2.prg
Code: Select all  Expand view
#include "FiveWin.ch"
#include "xbrowse.ch"

function Main()

   local oWnd, oFont, oBrw, oFont2, oFont3
   local aItems := { "Personalize", "Users", "Wireless" }
   
   DEFINE FONT oFont NAME "Segoe UI Light" SIZE 0, -52    

   DEFINE FONT oFont2 NAME "Segoe UI Light" SIZE 0, -32    

   DEFINE FONT oFont3 NAME "Segoe UI Light" SIZE 0, -16    

   DEFINE WINDOW oWnd STYLE nOr( WS_POPUP, WS_VISIBLE ) ;
      COLOR RGB( 170, 170, 170 ), CLR_WHITE
     
   @ 2, 10 SAY "Control Panel" FONT oFont SIZE 300, 100
   
   @ 2, 80 SAY "Personalize" FONT oFont SIZE 300, 100
     
   @ 10, 7 XBROWSE oBrw ARRAY aItems COLSIZES 800 CELL ;
      FONT oFont2 SIZE 400, 650 NOBORDER OF oWnd
     
   oBrw:nDataLines = 2  
   oBrw:lRecordSelector = .F.
   oBrw:lHeader   = .F.
   oBrw:lHScroll  = .F.
   oBrw:lVScroll  = .F.
   oBrw:nStretchCol = 1
   oBrw:bClrStd = { || { RGB( 170, 170, 170 ), CLR_WHITE } }
   oBrw:bClrSelFocus = { || { CLR_WHITE, RGB( 34, 177, 76 ) } }
   oBrw:SetColor( "B/W*" )
   
   oBrw:CreateFromCode()
   oBrw:aCols[ 1 ]:bPaintText = { | oCol, hDC, cText, aCoors, aColors, lHighlight | DrawRow( oCol, hDC, cText, aCoors, oFont3 )  }
   oBrw:SetFocus()
   
   ACTIVATE WINDOW oWNd MAXIMIZED ;
      ON CLICK oWnd:End()
     
return nil        

function DrawRow( oCol, hDC, cText, aCoors, oFont )

   local hOldFont
   local aItems := { "Customize your lock screen and user tile",;
                     "Change your account or add new ones",;
                     "Choose if apps notify you" }

   DrawText( hDC, cText, aCoors )
   aCoors[ 1 ] += 45
   hOldFont = SelectObject( hDC, oFont:hFont )
   DrawText( hDC, aItems[ oCol:oBrw:KeyNo ], aCoors )
   SelectObject( hDC, hOldFont )
   
return nil  
regards, saludos

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

Re: Windows 8 Metro style - A Class TMetro test

Postby Antonio Linares » Fri Sep 23, 2011 5:31 pm

Image

Code: Select all  Expand view
#include "FiveWin.ch"
#include "xbrowse.ch"

function Main()

   local oWnd, oFont, oBrw, oFont2, oFont3
   local aItems := { "Personalize", "Users", "Wireless", "Notifications", "Privacy", "General", "Search" }
   
   DEFINE FONT oFont NAME "Segoe UI Light" SIZE 0, -52    

   DEFINE FONT oFont2 NAME "Segoe UI Light" SIZE 0, -32    

   DEFINE FONT oFont3 NAME "Segoe UI Light" SIZE 0, -16    

   DEFINE WINDOW oWnd STYLE nOr( WS_POPUP, WS_VISIBLE ) ;
      COLOR RGB( 170, 170, 170 ), CLR_WHITE
     
   @ 2, 10 SAY "Control Panel" FONT oFont SIZE 300, 100
   
   @ 2, 80 SAY "Personalize" FONT oFont SIZE 300, 100
     
   @ 9, 7 XBROWSE oBrw ARRAY aItems COLSIZES 800 CELL ;
      FONT oFont2 SIZE 400, 700 NOBORDER OF oWnd
     
   oBrw:nDataLines = 2  
   oBrw:lRecordSelector = .F.
   oBrw:lHeader   = .F.
   oBrw:lHScroll  = .F.
   oBrw:lVScroll  = .F.
   oBrw:nStretchCol = 1
   oBrw:bClrStd = { || { RGB( 170, 170, 170 ), CLR_WHITE } }
   oBrw:bClrSelFocus = { || { CLR_WHITE, RGB( 34, 177, 76 ) } }
   oBrw:SetColor( "B/W*" )
   
   oBrw:CreateFromCode()
   oBrw:aCols[ 1 ]:bPaintText = { | oCol, hDC, cText, aCoors, aColors, lHighlight | DrawRow( oCol, hDC, cText, aCoors, oFont3 )  }
   oBrw:SetFocus()
   
   ACTIVATE WINDOW oWNd MAXIMIZED ;
      ON CLICK oWnd:End()
     
return nil        

function DrawRow( oCol, hDC, cText, aCoors, oFont )

   local hOldFont
   local aItems := { "Customize your lock screen and user tile",;
                     "Change your account or add new ones",;
                     "Turn wireless and airplane mode on or off",;
                     "Choose if apps notify you",;
                     "Control how apps use your personal info",;
                     "Change time zone and keyboard settings",;
                     "Pick what/where you want to search" }

   DrawText( hDC, cText, aCoors )
   aCoors[ 1 ] += 45
   hOldFont = SelectObject( hDC, oFont:hFont )
   DrawText( hDC, aItems[ oCol:oBrw:KeyNo ], aCoors )
   SelectObject( hDC, hOldFont )
   
return nil  
regards, saludos

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

Re: Windows 8 Metro style - A Class TMetro test

Postby Otto » Fri Sep 23, 2011 8:29 pm

Hello Norberto,

>Win32 aplications runs in desktop mode in windows 8.(old start menu).
What do you mean by that? I have WINHOTEL in a metro UI tile. So I can start the program from the MetroUI.

I am playing around with windows 8 on a desktop PC with mouse and on a notebook with touch screen.
I like the new design.
But I think it is not clear at the moment how a real working program ( WORD, EXCEL, Outlook or other applications will look in future ). So I think it is an excellent start if we can try to design programs now with Antonio’s help in windows 8 look.
Maybe MetroUI is only used by WINDOWS and not for own programs but the “Control Panel” style will be everywhere.

I also feel that Ribbonbar does not fit any more to the new Metro design. Although Windows Explorer is new in Windows 8 it doesn’t look – for me – modern. Otherwise the new Internet Explorer is very attractive.
Best regards,
Otto
********************************************************************
mod harbour - Vamos a la conquista de la Web
modharbour.org
https://www.facebook.com/groups/modharbour.club
********************************************************************
User avatar
Otto
 
Posts: 6332
Joined: Fri Oct 07, 2005 7:07 pm

Re: Windows 8 Metro style - A Class TMetro test

Postby norberto » Fri Sep 23, 2011 8:41 pm

Otto, You can see in Building windows 8 blog, http://blogs.msdn.com/b/b8/ , but i read in several places: you can make appl to metro UI (native) , but only in Html5 + Java, pehaps it change in final version.
Ribbonbar is incorporated in Explorer, and improved.

regards

Norberto
norberto
 
Posts: 566
Joined: Thu Aug 30, 2007 3:40 pm
Location: BR

Re: Windows 8 Metro style - A Class TMetro test

Postby Antonio Linares » Fri Sep 23, 2011 8:57 pm

Otto,

I have WINHOTEL in a metro UI tile. So I can start the program from the MetroUI


Could you please explain how you did it ? Is there a video or step by step explanation ? It may be quite simple but I wasn't aware to do it :-)
regards, saludos

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

Re: Windows 8 Metro style - A Class TMetro test

Postby norberto » Fri Sep 23, 2011 9:02 pm

Otto , i can put my appl in metro UI too, but like an link, not an metro UI native, Metro UI is immersive.

Office 15 is in Metro UI style :

Image
Last edited by norberto on Fri Sep 23, 2011 9:18 pm, edited 1 time in total.
norberto
 
Posts: 566
Joined: Thu Aug 30, 2007 3:40 pm
Location: BR

Re: Windows 8 Metro style - A Class TMetro test

Postby norberto » Fri Sep 23, 2011 9:15 pm

HI, in picture, we can see two types of appl :metro UI appl and desktop appl, some people says to interact with metro UI tiles, only in Html5+java.

FWH appl will run in windows 8, but like desktop appl, i can put it in metro UI, but in static tile, not interactive Tile.

Image

pehaps this change until final version.
norberto
 
Posts: 566
Joined: Thu Aug 30, 2007 3:40 pm
Location: BR

Re: Windows 8 Metro style - A Class TMetro test

Postby Rick Lipkin » Fri Sep 23, 2011 9:50 pm

To All

Just curious if Win 8 still supports ADO ? as in sqloledb ?? without the need for the dot net framework ?

Rick Lipkin
User avatar
Rick Lipkin
 
Posts: 2665
Joined: Fri Oct 07, 2005 1:50 pm
Location: Columbia, South Carolina USA

Re: Windows 8 Metro style - A Class TMetro test

Postby James Bott » Sat Sep 24, 2011 3:28 pm

This is a good article on the subject.

Microsoft's Metro proves the PC is dead
http://www.zdnet.com/blog/perlow/microsofts-metro-proves-the-pc-is-dead/18705

The title is somewhat misleading. It might be better as "Microsoft's Metro proves the Win32 API is dead." If you read between the lines it implies that we are going full circle back to the mainframe era where all data resides on a large computer (in the "cloud") and we access it using PC's (desktops, notebooks, tablets, smart-phones) instead of the old dumb terminals we used to have.

Regards,
James
User avatar
James Bott
 
Posts: 4840
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA

Re: Windows 8 Metro style - A Class TMetro test

Postby James Bott » Sat Sep 24, 2011 3:50 pm

Also see this article:

WinRT Is Replacing Win32
http://www.winsupersite.com/blog/supersite-blog-39/windows8/winrt-replacing-win32-140605

Add be sure to read the comments at the end. One programmer says that WinRT is still using Win32 DLLs, but if you code to WinRTs API, then this frees Microsoft to later eliminate the Win32 DLLs.

Also there is mention that Metro Apps will only be allowed to be sold through a MS store and they will have to be approved by MS, all just the same as Apple. I don't like it.

Regards,
James
User avatar
James Bott
 
Posts: 4840
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA

Re: Windows 8 Metro style - A Class TMetro test

Postby Bayron » Sat Sep 24, 2011 4:12 pm

I think is time to think about it, but is not to worry about it...

As you know, there is many people that has not migrated from WinXP to Win7, regarless of many advantages... I think the same will happen to this new technology, It will win at the end, but not without war, and after many years...

Right now it will take more than a year just to come out, and I guess more than 10 years to be fully acepted.

In the mean time (x)Harbour and FiveWin, will have the time to port from Win32 to WinRT for the END OF THE DAYS of Win32...

We may or not may be there at first, but we will there to stay....

EDITED:
You won't beleive how many people have DOS app's still working...

Rick: Is my understanding that
Win8 supports Win32 still == Will support our app's as they are (NOT IN METRO)
Next Windows will only support WinRT == We may have a problem without porting our app's ...
=====>

Bayron Landaverry
(215)2226600 Philadelphia,PA, USA
+(502)46727275 Guatemala
MayaBuilders@gMail.com

FWH12.04||Harbour 3.2.0 (18754)||BCC6.5||UEstudio 10.10||
Windows 7 Ultimate

FiveWin, One line of code and it's done...
User avatar
Bayron
 
Posts: 815
Joined: Thu Dec 24, 2009 12:46 am
Location: Philadelphia, PA

Re: Windows 8 Metro style - A Class TMetro test

Postby Otto » Sat Sep 24, 2011 5:19 pm

Hello Antonio,
To show my program in MetroUI I did:

1) First I made a desktop Shortcut.
In my case this is located in c:\users\demo\desktop\winhotel- Shortcut.lnk
2) I created a folder WINHOTEL in
c:\users\demo\appData\roaming\microsodt\windows\Start menu\Programs
3) I copied the winhotel-shortcut.lnk to this new folder.

Then if you open the MetroUI again your application is there.

Best regards,
Otto
********************************************************************
mod harbour - Vamos a la conquista de la Web
modharbour.org
https://www.facebook.com/groups/modharbour.club
********************************************************************
User avatar
Otto
 
Posts: 6332
Joined: Fri Oct 07, 2005 7:07 pm

Re: Windows 8 Metro style - A Class TMetro test

Postby Bayron » Sat Sep 24, 2011 5:37 pm

Good work Otto!!!

The Metro UI sounded only like a Menu, so it had to be a way!!!
=====>

Bayron Landaverry
(215)2226600 Philadelphia,PA, USA
+(502)46727275 Guatemala
MayaBuilders@gMail.com

FWH12.04||Harbour 3.2.0 (18754)||BCC6.5||UEstudio 10.10||
Windows 7 Ultimate

FiveWin, One line of code and it's done...
User avatar
Bayron
 
Posts: 815
Joined: Thu Dec 24, 2009 12:46 am
Location: Philadelphia, PA

PreviousNext

Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 78 guests

cron