I'll need to create some "wrapper" for using visual ActiveX component in Navision. Please, can anybody send me some source codes or some How-To create this wrapper?
The only thing can tell that it isn't easy. My advise, if you havent VC++ experience you have a very small chance in success. What kind of control do you want to wrap?
Regards,
Jan-Pieter
In a world without Borders or Fences, who needs Windows and Gates?
Ok, thats a different story, i thought you would like to visualize the OCX component in Navision.
I now understand you only want to expose the OCX properties and functions to navision.
Well, a quick explination:
1. Start a new VB6 Activex DLL project.
2. Create dummy form.
3. Place OCX on this form.
4. Try to copy the interface of the OCX by creating functions propeties. Do this in the automation class *
5. In these properties and functions call frmDummy.OCXinstnacename.FunctionName
6. compile DLL
7. use it in navision
How to create properties and funcition example:
Option explicit
Public property Get PrinterName as string
PrinterName = frmDummy.OCXinstanceName.Printername
End Property
Public property Let PrinterName(newValue as string)
frmDummy.OCXinstanceName.PrinterName = newValue
end property
Public Function PrintDocument(Copies as integer) as long
PrintDocument = frmDummy.OCXinstanceName.PrintDocument(Copeis)
End Function
This will get you started i think. Though, can't explain everything. They write books about it buy one of these.
If you need to visualize the component then you should load the form as well.
Regards,
Jan-Pieter
In a world without Borders or Fences, who needs Windows and Gates?
I made something like janpieter described, but I don't know how to make the form visible. If I call the function Form1.Show, Navision shows the following error message:
Non-modal forms cannot be displayed in the host application from an ActiveX DLL, ActiveX Control, or Property Page.
Comments
Regards,
Jan-Pieter
I need to wrap OCX which is needed to printing on specific label printer
I now understand you only want to expose the OCX properties and functions to navision.
Well, a quick explination:
1. Start a new VB6 Activex DLL project.
2. Create dummy form.
3. Place OCX on this form.
4. Try to copy the interface of the OCX by creating functions propeties. Do this in the automation class *
5. In these properties and functions call frmDummy.OCXinstnacename.FunctionName
6. compile DLL
7. use it in navision
How to create properties and funcition example:
This will get you started i think. Though, can't explain everything. They write books about it buy one of these.
If you need to visualize the component then you should load the form as well.
Regards,
Jan-Pieter
Non-modal forms cannot be displayed in the host application from an ActiveX DLL, ActiveX Control, or Property Page.
Is there any way to set the form 'modal'?