Buenas compa帽eros:
Tengo este c贸digo (Simplificado)
Para minimizar la ventana manualmente 驴como puedo hacer?
Intento con:
... action ::Minimize()
pero me genera un error del tipo: Error BASE/1004 Class: 'NIL' has no exported method: OWND
驴C贸mo lo puedo hacer?
Mil gracias.
Un saludo.
LORENZO
Tengo este c贸digo (Simplificado)
#xcommand DEFINE METRO <oMtr> [ BACKGROUND <cFileName> ] [ BTNSIZE <nBtnWidth>, <nBtnHeight> ] [ TITLE <cTitle> ] ;
聽 聽 聽 聽 聽 => <oMtr> := TMetro():New( <cTitle>, <nBtnWidth>, <nBtnHeight>, <cFileName> )
#xcommand DEFINE METROBUTTON [<oBtn>] 聽[ PROMPT <cPrompt> ] 聽[ COLOR <nClrText>, <nClrPane> ] 聽[ IMAGE <cImgName> ] 聽;
聽 聽 聽 聽 聽 聽 聽[ OF <oMetro> ] 聽[ <large: LARGE> ] 聽[ <lminimiza: MINIMIZA> ] 聽[ ACTION <uAction,...> ] 聽;
聽 聽 聽 聽 聽 => 聽[ <oBtn> := ] <oMetro>:AddButton( <cPrompt>, <nClrText>, <nClrPane>, <.large.>, <.lminimiza.>, <cImgName>, [{||<uAction>}] )
#xcommand ACTIVATE METRO <oMtr> => <oMtr>:Activate()
oMetro:=TMetro():New('Gesti贸n empresarial',,,,'')
DEFINE METROBUTTON OF oMetro PROMPT "Clientes" 聽 聽 聽COLOR CLR_WHITE, RGB( 002, 174, 224 ) 聽 聽 聽 IMAGE camino+"\images\metro\users.BMP" action clie(1)
DEFINE METROBUTTON OF oMetro PROMPT "Minimizar" 聽 聽COLOR CLR_WHITE, RGB( 002, 174, 224 ) 聽 聽 聽 IMAGE camino+"\images\metro\minimo.BMP" action ::oWnd:Minimize()
oMetro:activate()
//--------------------------------//
CLASS TMetro
聽 聽DATA 聽oWnd, oFont, oFontB, oFontA, oFontC, oFontD
聽 聽DATA 聽cFileName
聽 聽DATA 聽aButtons
聽 聽DATA 聽nOriginX, nOriginY
聽 聽DATA 聽nBtnWidth, nBtnHeight
聽 聽DATA 聽cTitle
聽 聽DATA 聽nRow, nCol
聽 聽DATA 聽oTimer
聽 聽DATA 聽hBitmap
聽 聽METHOD New( cTitle, nBtnWidth, nBtnHeight, cFileName )
聽 聽METHOD Activate()
聽 聽METHOD AddButton( cCaption, nClrText, nClrPane, lLarge, lminimiza, cImgName, bAction )
聽 聽METHOD End() INLINE ::oWnd:End()
ENDCLASS
METHOD New( cTitle, nBtnWidth, nBtnHeight, cFileName ) CLASS TMetro
聽 聽DEFAULT cTitle := "MyApp", nBtnWidth := 132, nBtnHeight := 132
聽 聽::cTitle 聽 聽 = cTitle
聽 聽::aButtons 聽 = {}
聽 聽::nBtnWidth 聽= nBtnWidth
聽 聽::nBtnHeight = nBtnHeight
聽 聽::nOriginX 聽 = 200
聽 聽::nOriginY 聽 = 200
聽 聽::nRow 聽 聽 聽 = 聽 0
聽 聽::nCol 聽 聽 聽 = 聽 0
聽 聽if File( cFileName )
聽 聽 聽 ::hBitmap = ReadBitmap( 0, cFileName )
聽 聽endif
聽 聽DEFINE FONT ::oFont 聽NAME "Century Gothic" SIZE 0, -60
聽 聽DEFINE WINDOW ::oWnd STYLE nOr( WS_POPUP, WS_VISIBLE ) COLOR CLR_WHITE, CLR_BLACK
return Self
//----------------------------------------------------------------------------//
METHOD Activate() CLASS TMetro
聽 聽ACTIVATE WINDOW ::oWnd MAXIMIZED 聽ON PAINT ( DrawBitmap( hDC, ::hBitmap, 0, 0, GetSysMetrics( 0 ), GetSysMetrics( 1 ) ),;
聽 聽 聽 聽 聽 聽 聽 聽 聽::oWnd:Say( 3 , 16 , ::cTitle ,,, ::oFont ,, .T. ), ::oWnd:Say( 42, 16 , 'Ruta de acceso: '+cruta ,,, ::oFontD,, .T. ) )
return nilPara minimizar la ventana manualmente 驴como puedo hacer?
Intento con:
... action ::Minimize()
pero me genera un error del tipo: Error BASE/1004 Class: 'NIL' has no exported method: OWND
驴C贸mo lo puedo hacer?
Mil gracias.
Un saludo.
LORENZO