Hosting ActiveX control in Navision

PriyaPriya Member Posts: 10
Hi All,

I want to have a visual ActiveX component in Navision. I have gone through the posting where people have mentioned that visualizing an ActiveX control isnt possible without a wrapper. But I am not able to make out whether it is possible to somehow make it possible without a wrapper.
I have the source code of the control with me. I have a public method in this control which is not visible in Navision when I try to access it in Navision. So is there any way other than wrapper to expose that method in Navision? Like making some changes in the current control itself so that I can use it in Navision?

Thanks and Regards,
Priya.

Comments

  • MadhanMadhan Member Posts: 96
    hi,

    can you explain little clear about your query.

    anyway, If it is a dll components i think is it possible to use in Navision.
  • PriyaPriya Member Posts: 10
    Hi,
    Thanks for the reply.

    The control is an ocx. I want to host this ocx in Navision. But when i do that I am not able to see any of the interfaces which are exposed in this ocx. My interpretation is that being a visual control, I am not able to view it in Navision. So I created a wrapper for this and it works. This wrapper is another ocx without visual control. Both ocx's are written in VC++ using MFCs.

    My query is that can i make some changes in my original ocx iteself (without any need for writing another ocx) so as to make it visible in Navision? As Madhan said that if i have a dll it will work, but now i'll need a dll wrapper for my ocx which i just want to skip. Can i somehow expose my ocx functionalities directly (by making some changes in my ocx) ? or a wrapper is all what i need?

    Thanks
    Priya.
  • MadhanMadhan Member Posts: 96
    ya r u right,

    navision dont support visual controls and i like to know one more thing, whether your OCX is from internal navision or you made urself?

    if not internal ocx,I help u much,cause I dont know what u have coded with your ocx in VC++.

    Anyway, update ur scenorio for wat purpose u r trying to do these.

    Regards
    Madhan
  • janpieterjanpieter Member Posts: 298
    If i understand correctly you want the usercontrol to make an instance of itself?

    You probably can't do this. You need to program the same interface in your wrapper dll and forward all methods.

    Its not that much work.

    I have never tried but there might be a posibility that you create a function in the wrapper dll that passes an object refference back to navision so you can access the usercontrol like this:
    WrapperVar.UserControl.DoSomething;
    

    Or:
    UserControlVar := WrapperVar.Usercontrol;
    UserControlVar.DoSomething;
    
    In a world without Borders or Fences, who needs Windows and Gates?
  • PriyaPriya Member Posts: 10
    Hi,

    That was one great piece of advice. Thanks, I'll try that.

    But tell me, are there any interfaces from activex control that are not supported by Navision? The ocx uses an Object safety interface. Can this be the reason i am not able to see the methods in Navision? Actually, My ocx is not a pure visual control. I have all the visual controls placed on a dialog and we can instantiate that dialog whenever we want. So accordingly, i must be able to atleast see all the methods, isnt it?

    Thanks and Regards,
    Priya.
  • janpieterjanpieter Member Posts: 298
    If you truly have an activex control you must be able to see all public methods. But is what you have really activex?

    This is not really my expertise but in .NET i think you can make controls other then activex and in .NET you will have to expose methods to COM to create backwards compatibility to activex (have a look in MSDN for that)
    In a world without Borders or Fences, who needs Windows and Gates?
Sign In or Register to comment.