How can use custom ocx control

icobani
Member Posts: 70
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.
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.com
My BLOG
I m a Consult
E-Mail: ibrahim@imaconsult.com
My BLOG
0
Comments
-
In general you can't use visual controls with navision. There are some workarounds, like for example draw the control in the active window and stuff like that but you need to know a bit about that.Andre Fidalgo
My world: Dynamics NAV,SQL and .NET
CEO at Solving Dynamics
http://www.solvingdynamics.com0 -
if i can't use visual control with navision why i use ocx maybe use automation (.dll). I can see ocx sample but only ocx file (for example treeviews, chart) without source. What is the diferent my ocx project than other ? :-kIbrahim COBANI | Dynamics-NAV Developer Team Manager
I m a Consult
E-Mail: ibrahim@imaconsult.com
My BLOG0 -
sorry, dont know how to do it using VBAndre Fidalgo
My world: Dynamics NAV,SQL and .NET
CEO at Solving Dynamics
http://www.solvingdynamics.com0 -
Use the dll option, you can run your VB User Control from within the dll, to collect the information then pass it back, through your vb function.
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.Analyst Developer with over 17 years Navision, Contract Status - Busy
Mobile: +44(0)7854 842801
Email: david.cox@adeptris.com
Twitter: https://twitter.com/Adeptris
Website: http://www.adeptris.com0 -
I think he wants to see is user control inside the navision form (not in a different window), but i can be wrongAndre Fidalgo
My world: Dynamics NAV,SQL and .NET
CEO at Solving Dynamics
http://www.solvingdynamics.com0 -
I tried using my own controls inside Navision and it is possible. What do you need:
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)0
Categories
- All Categories
- 73 General
- 73 Announcements
- 66.6K Microsoft Dynamics NAV
- 18.7K NAV Three Tier
- 38.4K NAV/Navision Classic Client
- 3.6K Navision Attain
- 2.4K Navision Financials
- 116 Navision DOS
- 851 Navision e-Commerce
- 1K NAV Tips & Tricks
- 772 NAV Dutch speaking only
- 617 NAV Courses, Exams & Certification
- 2K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 320 Dynamics CRM
- 111 Dynamics GP
- 10 Dynamics SL
- 1.5K Other
- 990 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 35 Design Patterns (General & Best Practices)
- 1 Architectural Patterns
- 10 Design Patterns
- 5 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1.1K General Chat
- 1.6K Website
- 83 Testing
- 1.2K Download section
- 23 How Tos section
- 252 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions