vs.net中怎么调用ocx的事件?
方法或函数我都会调。

解决方案 »

  1.   

    http://msdn2.microsoft.com/zh-cn/library/dd8bf0x3.aspx
      

  2.   

    ocx 事件 .net 都会自动转为.net事件 
      

  3.   

    首先用命令行: Regsvr32 /s [盘符:\][路径\]组件.ocx (注册组件)
    然后在 解决方案资源管理器->项目->引用->(右键)添加引用(R)->COM->选择你刚才注册的组件{查阅路径}..
    最后就 using 命名空间; 直接使用即可..
    ^ō^
      

  4.   


    C语言的代码   
    typedef struct 

    DJ_S8 m_s8ServerIp[32]; /*XMS server ip*/ 
    DJ_U32 m_u32ServerPort; /*XMS server port*/ 
    DJ_S8 m_s8UserName[32]; /**/ 
    DJ_S8 m_s8UserPwd[32]; /**/ 
    }ServerID_t;/**/ 
    /**/ 
    ServerID_t cfg_ServerID; 
    /*调用acsOpenStream 建立与ACS服务器的连接*/ 
    r = XMS_acsOpenStream ( &g_acsHandle,  
    &cfg_ServerID, 
    g_u8UnitID, // App Unit ID  
    32, // sendQSize, in K Bytes 
    32, // recvQSize, in K Bytes 
    cfg_s32DebugOn, // Debug On/Off 
    NULL); 
    人家把C代码转成ActiveX控件 
    在NET中 AcsOpenStream(ref int acsHandle, ref int serverID, short u8AppID, int u32SendQSize, int u32RecvQSize, int s32DebugOn, ref int privateData); ref int serverID serverID应该对应的是ServerID_t类型,那为怎么会变成 (ref int serverID)    INT哪? 怎么解决啊。 
      

  5.   

    给你一个我引用的例子phone = new AxEXSoftPhone.AxSoftphone();
                phone.Parent = panel1;
                phone.Size = new System.Drawing.Size(220, 310);
                phone.OnCTIEvent += new AxEXSoftPhone.@__Softphone_OnCTIEventEventHandler(this.axSoftphone1_OnCTIEvent);
                phone.OnAppEvent += new AxEXSoftPhone.@__Softphone_OnAppEventEventHandler(this.axSoftphone1_OnAppEvent);private void axSoftphone1_OnAppEvent(object sender, AxEXSoftPhone.__Softphone_OnAppEventEvent e)
            {
                //干活        }            
      

  6.   

    添加引用后,就和.net的控件一样用了!难道看不到事件?