Página 2 de 2

Enviado: 21 Set 2007 15:23
por prodasys
Faça o teste da seguinte forma :

function main()
gt()
@ 5, 5 say "Apenas um Teste"
inkey(0)
return nil

Enviado: 21 Set 2007 16:09
por sygecom
prodasys escreveu:Ederxc, esqueça o setmode(25,80).Na gtwvw não funciona.De uma olha no fonte abaixo.É o mais proximo que eu consegui para o meu sistema funcionar parecido com a tela do DOS na janela da GTWVW.
Setmode() funciona sim, se quiser te mando os samples que envie para o Eder.

Enviado: 21 Set 2007 18:00
por prodasys
Opa Leonardo.Nao me expressei bem. O setmode(25,80) não deixa a janela maximixada, mas o setmode funciona sim, tanto que no exemplo que eu postei, o setmode() esta sendo utilizado.

Enviado: 21 Set 2007 18:23
por sygecom
Agora entendi...

Enviado: 07 Dez 2007 17:12
por geraldenaw
Luiz escreveu:Para maximizar você pode utilizar esse código (adaptado de maximize.prg)

Código: Selecionar todos

* this dimension will be used when user presses RESTORE button
static s_nNormalMaxrow := 24
static s_nNormalMaxcol := 79

procedure main
  wvw_enablemaximize(0, .t.)
  wvw_maximize(0)
  wait
  
function WVW_SIZE(nWinNum, hWnd, message, wParam, lParam)
* this function is called by gtwvw AFTER the size is changed
* WARNING: screen repainting is not performed completely by gtwvw at this point of call
local cScreen
local lNeedReset := .f., ;
      maxsavedscrrow, maxsavedscrcol
   if !WVW_SIZE_READY()
      * program is not ready to handle window resizing
      * (or this function is currently running)
      return NIL
   endif
   if nWinNum<>0
      * only care about Main Window
      return NIL
   endif

   * avoid reentrance
   WVW_SIZE_READY(.f.)

   do case
      case wParam == 2 //SIZE_MAXIMIZED
         //alert("MAXIMIZE")
         * reset is required only if we are changing size
         lNeedReset := maxcol() <> wvw_maxmaxcol();
                       .or. maxrow() <> wvw_maxmaxrow()

         if lNeedReset
            maxsavedscrrow := min(min(s_nNormalMaxrow, wvw_maxmaxrow()),maxrow())
            maxsavedscrcol := min(min(s_nNormalMaxcol, wvw_maxmaxcol()),maxcol())
            cScreen := savescreen(0,0,maxsavedscrrow, maxsavedscrcol)
            if setmode(wvw_maxmaxrow()+1, wvw_maxmaxcol()+1) //adjust maxrow() & maxcol()
               restscreen(0,0,maxsavedscrrow, maxsavedscrcol, cScreen)
            endif
            //diminfo()  //updatescr()
         endif
      case wParam == 0 //SIZE_RESTORED
         //alert("RESTORE")
         lNeedReset := maxcol() <> s_nNormalMaxcol .or.;
                       maxrow() <> s_nNormalMaxrow
         if lNeedReset
            maxsavedscrrow := min(s_nNormalMaxrow, maxrow())
            maxsavedscrcol := min(s_nNormalMaxcol, maxcol())
            cScreen := savescreen(0,0,maxsavedscrrow, maxsavedscrcol)
            if setmode(s_nNormalMaxrow+1,s_nNormalMaxcol+1)
               restscreen(0,0,maxsavedscrrow, maxsavedscrcol, cScreen)
            endif
            //diminfo()  //updatescr()
         endif
      otherwise
         * do nothing
   endcase

   * allow next call
   WVW_SIZE_READY(.t.)
return NIL  
  
#pragma BEGINDUMP

#include "hbapi.h"

HB_FUNC( WVW_SIZE_READY )
{
   BOOL bIsReady;
   static BOOL s_bIsReady = FALSE;
   bIsReady = s_bIsReady;
   if (ISLOG(1))
   {
      s_bIsReady = hb_parl(1);
   }
   hb_retl(bIsReady);
}
#pragma ENDDUMP
No sistema da empresa eu uso a janela maximizada somente pra vizualizar os relatórios, com ajuste de fonte manual para simular um zoom.
Quanto ao tamanho da fonte você pode deixar uma opção para o usuário da estação escolher (usando wvw_choosefont), porque depende tambem da rezolução da tela.
Boa tarde amigo,

Assim está funcionando blz. Só que quando monto os menus e dou o :RUN(,,.T.) ele diminui a tela, não fica maximizado. Tem alguma sugestão? Desde já obrigado.

Enviado: 07 Dez 2007 23:06
por sygecom
Que tipo de Run ? vc quer executar algo por baixo dos panos ? se executar por baixo dos pano sua app fica em focu.