Options

Can one use VB to create an OCX?

krishnadkrishnad Member Posts: 36
edited 2000-04-01 in Navision Financials
I have been looking at the Navision 2.5 CD and has virtually no OCX documentation. Since I have previously created OCX's for other applications using Visual Basic - Can VB be used to do OCX's for Navision? Where is the documentation?

Thanks,

KD

Comments

  • Options
    John_TegelaarJohn_Tegelaar Member Posts: 159
    Yes, OCX's made with VB can be used, with a number of restrictions. From C/SIDE Help:

    quote:

    The OCX data type is used to reference a custom control (OCX, ActiveX Control). In order to use a control in C/SIDE, define a variable of type OCX and give it a name. Then use the lookup in the Subtype field to locate and select the control you want to use. You select from a list of installed controls, and when you select one, the GUID of the control is inserted. When the focus leaves the Subtype field, the name of the control is substituted for the GUID.

    When you have defined a control as a variable, you can use the control through the variable, and you can browse its methods and properties in the Symbol Menu.

    When you are using a control, you should know that not all COM data types are supported and that there is not a one-to-one relationship between C/AL data types and COM data types. Click here to see an overview of the datatype mapping and support.

    You should also note that events are not supported.

    unquote.

    Regards,

    John
  • Options
    krishnadkrishnad Member Posts: 36
    Thanks a lot for your reply. But where is the documentation for the OCX? :confused

  • Options
    John_TegelaarJohn_Tegelaar Member Posts: 159
    Krishnad, what documentation do you expect to find?

    Do you want to make an OCX to be accessed from Navision as custom control, i.e. to do some special functions, then you should search the VB Help (MSDN Library) for details on making ActiveX controls.

    Do you want to make an OCX to access Navision from outside, then you will probably want to study the C/FRONT and C/ODBC docs, which are on the CD.

    John
  • Options
    krishnadkrishnad Member Posts: 36
    What I'd like to do is to call an OCX module from Navision which would pull some data from a table into memory and manipulate it using "Drag and Drop". Then save it back. The program is already written and I would like to adapt it to Navision.

    What I'd like to find out in the documentation is which *references* to select into VB in order to talk to Navision. I think I found the different calls in the C/Front documentation. But they keep talking about C++ only. VB setup is slightly different.

    I have already done OCX's for Preactor (a scheduler) but they had documentation for VB and provided a number of projects as examples.

    On the 2.5 CD there is only a C++ source example. I would like a VB example.

    These things may look very simple once they are known. But to me right now seem very daunting.

    I am willing to pay for some training.

    Thank you for your help.

    Sincerely,

    KD

  • Options
    krishnadkrishnad Member Posts: 36
    I think my problem is that I'm expecting to create an OCX by making a reference to a Library Set. I have created several OCX's for Preactor which is a British scheduling software and the documentation merely points out to make reference to "Preator Type Library". I wonder if there is such a
    type library for Navision...

    Do you have a small sample VB project I could study?

    Thanks

    KD

Sign In or Register to comment.