Options

Custom OCX GUI control

BuschnicKBuschnicK Member Posts: 5
Hello all,

I'm new to Navision (I am using 4.0SP2) and am trying to integrate a custom made data entry form. So far without success. The plugin comes in the form of an OCX which I'm using from VB.Net or C#. Somehow I cannot get anything to show up within Navision - though it works fine in DevStudio. Non-GUI OCXs seem to work without trouble in Navision.

Can anyone point me to a small sample showing how to do this (using custom GUI OCXs in Navision)? Book recommendation?

regards,

Sören

Comments

  • Miklos_HollenderMiklos_Hollender Member Posts: 1,598
    There are a number of such GUI controls in the downloads section.
  • Captain_DX4Captain_DX4 Member Posts: 230
    From the ADG:
    C/SIDE supports COM technologies in two ways: using custom controls (OCXs) and as an automation controller. This support has a few limitations:

    Only non-visual controls are supported. This means that a control cannot be used to add graphical elements to a C/SIDE object (you cannot, for example, add a third-party control to a form). The control can, however, display information and interact with the user in a window of its own.

    Exception handling. C/SIDE does not allow the retrieval of information about exceptions from a control or automation server through the Invoke method of the IDispatch interface and the EXCEPINFO structure (as described, for example, in Inside OLE). The samples in the C/OCX Samples – the control and the C/SIDE application that uses it – show a way to work around this limitation. You can find a description on page 406.

    So basically if you have an OCX that opens up a separate window, you can use it with Navision.
    Kristopher Webb
    Microsoft Dynamics NAV Developer
  • Miklos_HollenderMiklos_Hollender Member Posts: 1,598
    I think it must have been true only before 4.0 - there are a number of custom GUI controls in the downloads section here at mibuso...
  • kinekine Member Posts: 12,562
    I think it must have been true only before 4.0 - there are a number of custom GUI controls in the downloads section here at mibuso...

    No, it is still same... the controls are using "hack" to show the controls on Navi forms. It is this way: the control find the windows handle and context of the foreground window of Navision and draw the control into this context. But there is not "native" support for that within Navision.
    Kamil Sacek
    MVP - Dynamics NAV
    My BLOG
    NAVERTICA a.s.
  • BuschnicKBuschnicK Member Posts: 5
    Thanks for the suggestions, I'll look into the Mibuso samples.

    regards,

    Sören
Sign In or Register to comment.