Activex com harbour

Projeto [x]Harbour - Compilador de código aberto compatível com o Clipper.

Moderador: Moderadores

Avatar do usuário
Itamar M. Lins Jr.
Administrador
Administrador
Mensagens: 7928
Registrado em: 30 Mai 2007 11:31
Localização: Ilheus Bahia
Curtiu: 1 vez

Activex com harbour

Mensagem por Itamar M. Lins Jr. »

Ola!

O Pritpal, está fazendo isso tornar-se realidade na GTWVG.


Saudações,
Itamar M. Lins Jr.

http://www.vouch.info/downloads/demowvg_ax.zip

Código: Selecionar todos

//----------------------------------------------------------------------//
Function ExecuteActiveX( nActiveX )

   hb_gtReload( 'WVG' )
   //hb_gtInfo( HB_GTI_PRESPARAMS, { , , 10, 10, 400, 400, , .F., .F. } )
   SetColor( 'N/W' )
   CLS
   SetMode( 30,60 )
   SetCursor( 0 )
   Wvt_ShowWindow( 1 )
   hb_gtInfo( HB_GTI_CLOSABLE, .F. )
   ExeActiveX( nActiveX )

   Return nil
//----------------------------------------------------------------------//
Static Function ExeActiveX( nActiveX )
   #ifdef HB_ACTIVEX
   Local ev_  := Hash()
   Local oCOM, nKey
   Local cServer
   Local cNavigate
   Local lEnd := .f.

   DEFAULT nActiveX TO 2

   if    nActiveX == 1
      cServer   := 'Shell.Explorer.2'
      cNavigate := 'http://www.harbour.vouch.info'
      hb_gtInfo( HB_GTI_WINTITLE, 'ActiveX: '+'Shell.Explorer.2'+'['+'http://www.harbour.vouch.info'+']' )

   elseif nActiveX == 2
      #define evClick     1
      #define evDblClk    2
      #define evBtnDown   3
      #define evMouseMove 4
      #define evBtnUp     5

      hb_gtInfo( HB_GTI_WINTITLE, 'ActiveX: '+'AnalogClockControl.AnalogClock' )
      cServer   := 'AnalogClockControl.AnalogClock'

      /* Event MouseUp in Analog Clock */
      ev_[ evDblClk ] := { {|| DoModalWindow(), ;
                               oCOM:Value     := .75632,;
                               oCOM:BackColor := RGB( 0,140,210 ),;
                               oCOM:Refresh(),  ;
                               oCOM:ShowSecondsHand := .t.,;
                               oCOM:Hands3D   := .t.,;
                               oCOM:Refresh()  } }

      /* Right button up will terminate the Session */
      ev_[ evBtnUp ] := { {|nBtn,nShift,nX,nY| if( nBtn == 2, lEnd := .t., NIL ) } }

   elseif nActiveX == 3
      cServer := 'file://c:\harbour\contrib\gtwvg\tests\myharu.pdf'

   endif

   oCOM := Hb_ActiveX():New( Wvt_GetWindowHandle(), cServer, 5, 0, 0, 200, 200, , , ev_ )
   if nActiveX == 1
      oCOM:Navigate( cNavigate )
   endif

   do while .t.
      if lEnd
         exit
      endif

      nKey := inkey()

      if nKey == HB_K_RESIZE
         Win_MoveWindow( oCOM:hActiveX, 0, 0, hb_gtInfo( HB_GTI_SCREENWIDTH ),  hb_gtInfo( HB_GTI_SCREENHEIGHT ), .F. )
      elseif nKey == K_LBUTTONDOWN
         hb_ToOutDebug( "Key is passed to the window procedure also!" )
      endif

      if nKey == 27
         exit
      endif
   enddo

   oCOM:Destroy()
   #endif
   Return nil
Saudações,
Itamar M. Lins Jr.
Avatar do usuário
sygecom
Administrador
Administrador
Mensagens: 7131
Registrado em: 21 Jul 2006 10:12
Localização: Alvorada-RS
Contato:

Re: Activex com harbour

Mensagem por sygecom »

Muito bom exemplo, esses dias dei uma olhada nas novas telas da GTWVG com visual grafico, esta show de bola !! Itamar,Você testou em Linux ?
Leonardo Machado
xHarbour.org + Hwgui + PostgreSql
Avatar do usuário
sygecom
Administrador
Administrador
Mensagens: 7131
Registrado em: 21 Jul 2006 10:12
Localização: Alvorada-RS
Contato:

Re: Activex com harbour

Mensagem por sygecom »

Alias pelo que vi, essa lib funciona em Linux também ?
Leonardo Machado
xHarbour.org + Hwgui + PostgreSql
Avatar do usuário
Itamar M. Lins Jr.
Administrador
Administrador
Mensagens: 7928
Registrado em: 30 Mai 2007 11:31
Localização: Ilheus Bahia
Curtiu: 1 vez

Re: Activex com harbour

Mensagem por Itamar M. Lins Jr. »

! Itamar,Você testou em Linux ?
No momento estou sem mexer nos meus sistema em linux.

O Windows está sendo mais genoroso $$$

Saudações,
Itamar M. Lins Jr.
Saudações,
Itamar M. Lins Jr.
Responder