ActiveX question?

ActiveX question?

Postby Taiwan » Mon Sep 25, 2006 9:06 am

Hello Antonio,

If I define window for ActiveX, work fine.

Code: Select all  Expand view
DEFINE WINDOW oWnd TITLE "FiveWin ActiveX Support"

   oActiveX = TActiveX():New( oWnd, "oa.oactrl.1" )

   oWnd:oClient = oActiveX

   oActiveX:Do( "ShowToolBars", .t. )
   oActiveX:Do( "Open", "c:\計算.xls" )
   
   ACTIVATE WINDOW ownd on init oActiveX:Do( "Open", "c:\計算.xls" )


If I define Dialog for ActiveX, work. but disappear any action.

Code: Select all  Expand view
DEFINE DIALOG oDlg RESOURCE "D_DR_WIN_TestActiveX"

         REDEFINE ACTIVEX oActiveX ID 10000 OF oDlg ;     PROGID "oa.oactrl.1"
       
  ACTIVATE DIALOG oDlg CENTER on init  init oActiveX:Do( "Open", "c:\計算.xls" )


I use xHarbour 0.99.4+FWH2.6+BCC55

Regards,

Richard
User avatar
Taiwan
 
Posts: 218
Joined: Fri Oct 07, 2005 1:55 am
Location: Taipei, Taiwan

Postby Antonio Linares » Mon Sep 25, 2006 9:32 am

Richard,

Have you defined the activex control in your RC as "TActiveX" ?
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42099
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Postby Taiwan » Mon Sep 25, 2006 2:13 pm

Hello Antonio,

Yes, I had define it as you said.

Richard
User avatar
Taiwan
 
Posts: 218
Joined: Fri Oct 07, 2005 1:55 am
Location: Taipei, Taiwan

Postby Taiwan » Mon Sep 25, 2006 2:16 pm

Hello Antonio,

This is my Resource RC below:

Code: Select all  Expand view
D_DR_WIN_TESTACTIVEX DIALOG 4, 36, 458, 263
STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
CAPTION "ActiveX"
FONT 12, "細明體"
{
CONTROL "", 10000, "TActiveX", 0 | WS_CHILD | WS_VISIBLE, 3, 2, 454, 260
}


Richard
User avatar
Taiwan
 
Posts: 218
Joined: Fri Oct 07, 2005 1:55 am
Location: Taipei, Taiwan

Postby Taiwan » Mon Sep 25, 2006 2:33 pm

Hello Antonio,

I found new question below:

Code: Select all  Expand view
DEFINE DIALOG oDlg RESOURCE "D_DR_WIN_TestActiveX"

         REDEFINE ACTIVEX oActiveX ID 10000 OF oDlg ;
                        PROGID "oa.oactrl.1"

         oActiveX:Do( "ShowToolBars", .t. )    ==> New add
         oActiveX:Do( "Open", "c:\計算.xls" )  ==> New add

ACTIVATE DIALOG oDlg CENTER ;
                on init ( oActiveX:Do( "ShowToolBars", .t. ),;
                            oActiveX:Do( "Open", "c:\計算.xls" ) )


If I New add two line code and get GPF occurred.
Called from ACTXPDISP(0)
Called from TACTIVEX:DO(297)
Called from TestActiveX(197)
.......
User avatar
Taiwan
 
Posts: 218
Joined: Fri Oct 07, 2005 1:55 am
Location: Taipei, Taiwan

Postby Antonio Linares » Mon Sep 25, 2006 3:51 pm

Richard,

You can not send msgs to the activex before the dialogbox has been initialized, as the activex has not been initialized yet too.
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42099
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Postby Taiwan » Tue Sep 26, 2006 1:15 am

Hello Antonio,

I see.
But why not appear in my Resource ActiveX? if I have not add New line.

Richard
User avatar
Taiwan
 
Posts: 218
Joined: Fri Oct 07, 2005 1:55 am
Location: Taipei, Taiwan

Postby Antonio Linares » Tue Sep 26, 2006 9:29 am

Richard,

> But why not appear in my Resource ActiveX? if I have not add New line.

I don't understand what you mean, sorry.
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42099
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Postby Taiwan » Wed Sep 27, 2006 12:47 am

Hello Antonio,

Let's return first message. Please review my codes.
My code use 1.DEFINE WINDOW 2.REDEFINE DIALOG

Problem is REDEFINE DIALOG .... REDEFINE ACTIVEX
Why not disappear ActiveX function?

Regards,

Richard
User avatar
Taiwan
 
Posts: 218
Joined: Fri Oct 07, 2005 1:55 am
Location: Taipei, Taiwan

Postby Antonio Linares » Wed Sep 27, 2006 6:16 am

Richard,

Do you mean that oActiveX:Do( "Open", "c:\計算.xls" )
does not work ?
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42099
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Postby areang » Wed Sep 27, 2006 8:49 am

Richard,

Only DEFINE WINDOW can use with ActiveX

this is same with DEFINE TIMER

TIMER CAN'T work with DIALOG

Best Regard
areang
areang
 
Posts: 128
Joined: Mon Jul 31, 2006 3:23 pm

Postby Enrico Maria Giordano » Wed Sep 27, 2006 9:42 am

This is not true:

Code: Select all  Expand view
#include "Fivewin.ch"


FUNCTION MAIN()

    LOCAL oDlg, oTmr

    DEFINE DIALOG oDlg

    DEFINE TIMER oTmr OF oDlg;
           INTERVAL 1000;
           ACTION TONE( 440, 1 )

    ACTIVATE DIALOG oDlg;
             ON INIT ( oTmr:hWndOwner := oDlg:hWnd,;
                       oTmr:Activate() );
             CENTER

    RELEASE TIMER oTmr

    RETURN NIL


EMG
User avatar
Enrico Maria Giordano
 
Posts: 8715
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia

Postby Taiwan » Thu Sep 28, 2006 1:14 am

Hello Antonio,

Antonio Linares wrote:Richard,

Do you mean that oActiveX:Do( "Open", "c:\計算.xls" )
does not work ?


Yes, it's not work(Disappear).

Richard
User avatar
Taiwan
 
Posts: 218
Joined: Fri Oct 07, 2005 1:55 am
Location: Taipei, Taiwan

Postby Antonio Linares » Thu Sep 28, 2006 5:41 am

Richard,

What do you mean with "disappear" ? Does the ActiveX gets hidden ?
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42099
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Postby Taiwan » Fri Sep 29, 2006 7:07 am

Antonio Linares wrote:Richard,

What do you mean with "disappear" ? Does the ActiveX gets hidden ?


Hello Antonio,

Look it.
DEFINE WINDOW OK.
Image

DEFINE DIALOG
REDEFINE ACTIVEX not display
Image

Richard
User avatar
Taiwan
 
Posts: 218
Joined: Fri Oct 07, 2005 1:55 am
Location: Taipei, Taiwan

Next

Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: Google [Bot] and 102 guests