I have an issue with an application which causes two problems. When I package and deploy my application to the clients PC and then run the app
it throws the following error :
Visual Basic Runtime Error 339
Component 'bluGrid.ocx' or one of its dependencies not correctly registered: a file is missing or invalid
Normally this would mean that I have missed recompiling one of the ocx objects that are included in my app. So, recompiling everything in the
correct order would sort this problem, unfortunately not in this case.
I have started to use the NuMega SmartCheck program to try and trace the problem and intermittently I get the same error, it highlights the
source of the problem as :
Public gfrmMain As frmMain
Public Sub Main()
Set gfrmMain = New frmMain
>>> gfrmMain.Show <<<<
This piece of code is placed in a module called [Startup.bas]. The ocx 'bluGrid.ocx' is an object which contains a datagrid and all the code
necessary to link it to a SQL Server database. It works properly in other apps that I have built. The one exception is that I have extended
it's functionality so that cells in the grid can dropdown another grid. Again all this works ok.
The only thing that I can think of that may be causing these problems is that in order that the dropdown would paint over all existing windows,
I used the Windows API 'SetParent' to make the dropdown window a direct child of the main app form (frmMain). When I close the dropdown I
always reset the dropdowns parent back the it's original parent.
Does anyone have any ideas?. Is this the only way to acheive a dropdown over existing windows?. Is it unsafe?