Hi all,
I m writing a ocx in vb6. This is very simple, only one label and one textbox control. I am compiling and register this control. I can't use this control in navision. I am examine thoroughly sample but i cant. I m creating a sub fom and main form in navision, declare global variable data type is ocx and select ocx object. but i cant see what is the problem.
i can't find simple sample.
thanks.
Ibrahim COBANI | Dynamics-NAV Developer Team Manager
I m a Consult
E-Mail:
ibrahim@imaconsult.comMy BLOG0
Comments
My world: Dynamics NAV,SQL and .NET
CEO at Solving Dynamics
http://www.solvingdynamics.com
I m a Consult
E-Mail: ibrahim@imaconsult.com
My BLOG
My world: Dynamics NAV,SQL and .NET
CEO at Solving Dynamics
http://www.solvingdynamics.com
The confusion about Navision and VB visual controls is this, you cannot place a VB control on the navision form Directly as such, but you can have VB forms with these controls on appearing as though they are on the form, you can of course load a VB form from within your dll, or ocx, into a new window.
Mobile: +44(0)7854 842801
Email: david.cox@adeptris.com
Twitter: https://twitter.com/Adeptris
Website: http://www.adeptris.com
My world: Dynamics NAV,SQL and .NET
CEO at Solving Dynamics
http://www.solvingdynamics.com
1. Create function in your ocx, which finds hWnd of topmost child window inside Navision. This can be done for example by setting an unique caption in Navision form window and find this findow
2. When you obtain a hWnd, you can use Windows API functions to manipulate with this Navision window (for example you can find a hDC and paint onto window ...)
3. This method can be used for normal windows and subforms (I am able for example run video in Navision subform)