WillyKelleher
Programmer
I have been able to create an ocx and get the screen to load in an application we use that was written in c++. The problem I am having is that I need to get the current company and user from the main app. The main app sets a property on its screen controls to its UIcontext and everthing is accessable after that. So I was told that I should add a property and then the main app would set it.
This crashes and throws a COLeException error when I do it with a property
Public Property Set xxxSetContext(ByVal New_xxxSetContext As Object)
Set m_xxxSetContext = New_xxxSetContext
PropertyChanged "xxxSetContext"
End Property
I have been able to change and use a public funtion with this same name and I can pop up message boxes verifying that it is called and I am getting the data from the main app the way I need to, also it does not crash like above.
The problem is it does not fire the paint event of my control and displays nothing as a result or there may be other reasons why nothing shows up.
If I remove or rename this function My control displays as designed and the message box in the paint event pops up but I have no acces to the main app data.
I have been working at this for a while and feel I am so close and I do not want to give up because if I can get this I no longer have to run standalone apps to access the main app api.
This crashes and throws a COLeException error when I do it with a property
Public Property Set xxxSetContext(ByVal New_xxxSetContext As Object)
Set m_xxxSetContext = New_xxxSetContext
PropertyChanged "xxxSetContext"
End Property
I have been able to change and use a public funtion with this same name and I can pop up message boxes verifying that it is called and I am getting the data from the main app the way I need to, also it does not crash like above.
The problem is it does not fire the paint event of my control and displays nothing as a result or there may be other reasons why nothing shows up.
If I remove or rename this function My control displays as designed and the message box in the paint event pops up but I have no acces to the main app data.
I have been working at this for a while and feel I am so close and I do not want to give up because if I can get this I no longer have to run standalone apps to access the main app api.