FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin para Harbour/xHarbour Mensaje Ya existe una ventana de Prevializacion
Posts: 1078
Joined: Thu Sep 27, 2007 03:47 PM
Mensaje Ya existe una ventana de Prevializacion
Posted: Mon Dec 29, 2014 03:39 PM
Saludos al Forum,
Ejecuto este codigo y me sale este mensaje Ya existe una ventana de Prevializacion

Code (fw): Select all Collapse
//--------------------------------------------------------------------------

Function VPrin34_(nOpc)


   DEFINE WINDOW oWnd FROM 1, 1 TO 20, 60 TITLE "Printing a Window"

   @ 3, 3 BUTTON "&Print me" OF oWnd SIZE 80, 20 ;
      ACTION PrintMe()  // try also with oWnd:HardCopy()

   ACTIVATE WINDOW oWnd

return nil

//----------------------------------------------------------------------------//

function PrintMe()

   local oPrn

   PRINT oPrn NAME "Test" PREVIEW
      PAGE
         oWnd:Print( oPrn, 1, 1, 2 )        // Scale factor 2
      ENDPAGE
   ENDPRINT

return nil
Ruben Dario Gonzalez
Cali-Colombia
rubendariogd@hotmail.com - rubendariogd@gmail.com
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: Mensaje Ya existe una ventana de Prevializacion
Posted: Mon Dec 29, 2014 08:26 PM
Ruben,

Tu ejemplo modificado asi, aqui funciona bien:

Code (fw): Select all Collapse
#include "FiveWin.ch"

static oWnd

//--------------------------------------------------------------------------

Function Main()

   DEFINE WINDOW oWnd FROM 1, 1 TO 20, 60 TITLE "Printing a Window"

   @ 3, 3 BUTTON "&Print me" OF oWnd SIZE 80, 20 ;
      ACTION PrintMe()  // try also with oWnd:HardCopy()

   ACTIVATE WINDOW oWnd

return nil

//----------------------------------------------------------------------------//

function PrintMe()

   local oPrn

   PRINT oPrn NAME "Test" PREVIEW
      PAGE
         oWnd:Print( oPrn, 1, 1, 2 )        // Scale factor 2
      ENDPAGE
   ENDPRINT

return nil
regards, saludos

Antonio Linares
www.fivetechsoft.com

Continue the discussion