// For 25, 50 and 60 lines x 80 columns
STATIC FUNCTION ModoWVT(nLines)
STATIC cFont := NIL
LOCAL aIni := LoadIni() // Load user preferences from INI
LOCAL aDefaults := VtDefaults()
LOCAL nSize := 0
LOCAL nWidth := 0
IF cFont == NIL
IF EMPTY( cFont := ALLTRIM(MEMOREAD( "FONTEWVT.flg" )) )
cFont := 'Lucida Console'
ENDIF
Hb_GtInfo( HB_GTI_FONTNAME, cFont )
ENDIF
IF nLines = 25
DO CASE
CASE LEN( aIni ) >= 2
nSize := aIni[1,1]
nWidth := aIni[1,2]
OTHERWISE
nSize := aDefaults[1,1]
nWidth := aDefaults[1,2]
END
// Se não fizer um antes e um depois não funciona.
SetMode(25,80)
HB_GTINFO( HB_GTI_FONTSIZE ,nSize )
HB_GTINFO( HB_GTI_FONTWIDTH ,nWidth )
SetMode(25,80)
ELSEIF nLines = 50
DO CASE
CASE LEN( aIni ) >= 2
nSize := aIni[2,1]
nWidth := aIni[2,2]
OTHERWISE
nSize := aDefaults[2,1]
nWidth := aDefaults[2,2]
END
SetMode(50,80)
HB_GTINFO( HB_GTI_FONTSIZE ,nSize )
HB_GTINFO( HB_GTI_FONTWIDTH ,nWidth )
SetMode(50,80)
ELSEIF nLines = 60
DO CASE
CASE LEN( aIni ) >= 2
nSize := aIni[3,1]
nWidth := aIni[3,2]
OTHERWISE
nSize := aDefaults[3,1]
nWidth := aDefaults[3,2]
END
SetMode(nLines,80)
HB_GTINFO( HB_GTI_FONTSIZE ,nSize )
HB_GTINFO( HB_GTI_FONTWIDTH ,nWidth )
SetMode(nLines,80)
ENDIF
RETURN .T.
STATIC FUNCTION VtDefaults()
STATIC aDefaults
STATIC ScreenHeight
STATIC ScreenWidth
DEFAULT ScreenHeight := Wvw_GetScreenHeight()
DEFAULT ScreenWidth := Wvw_GetScreenWidth()
IF EMPTY( aDefaults )
DO CASE
CASE ScreenWidth >= 1680 .AND. ScreenHeight >= 1050
aDefaults := { {39,21} , {18,20}, {15,20} }
CASE ScreenWidth >= 1600 .AND. ScreenHeight >= 900
aDefaults := { {34,20} , {17,20}, {14,20} }
CASE ScreenWidth >= 1400 .AND. ScreenHeight >= 1050
aDefaults := { {38,16} , {19,16}, {15,16} }
CASE ScreenWidth >= 1280 .AND. ScreenHeight >= 1024
aDefaults := { {37,15} , {19,16}, {15,16} }
CASE ScreenWidth >= 1280 .AND. ScreenHeight >= 960
aDefaults := { {36,16} , {18,16}, {15,16} }
CASE ScreenWidth >= 1280 .AND. ScreenHeight >= 800
aDefaults := { {30,16} , {15,16}, {12,16} }
CASE ScreenWidth >= 1280 .AND. ScreenHeight >= 768
aDefaults := { {28,16} , {14,16}, {11,16} }
CASE ScreenWidth >= 1280 .AND. ScreenHeight >= 720
aDefaults := { {26,16} , {13,16}, {10,16} }
CASE ScreenWidth >= 1280 .AND. ScreenHeight >= 600
aDefaults := { {22,16} , {11,16}, {9,16} }
CASE ScreenWidth >= 1152 .AND. ScreenHeight >= 864
aDefaults := { {32,14} , {16,14}, {13,14} }
CASE ScreenWidth >= 1024 .AND. ScreenHeight >= 768
aDefaults := { {26,14} , {14,12}, {11,12} }
CASE ScreenWidth >= 1024 .AND. ScreenHeight >= 705
aDefaults := { {26,12} , {14,12}, {11,12} }
CASE ScreenWidth >= 800 .AND. ScreenHeight >= 600
aDefaults := { {22,10} , {11,10}, {9,10} }
OTHERWISE
aDefaults := { {18, 8} , { 9, 8}, { 7, 8} }
ENDCASE
ENDIF
RETURN aDefaults
--
--
You received this message because you are subscribed to the Google
Groups "Harbour Users" group.
Unsubscribe: harbour-user...@googlegroups.com
Web: http://groups.google.com/group/harbour-users
---
You received this message because you are subscribed to the Google Groups "Harbour Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to harbour-user...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.