troubleshooting Question

Visual Basic Runtime Error 339

Avatar of Vincent_Monaghan
Vincent_MonaghanFlag for Ireland asked on
Visual Basic Classic
4 Comments1 Solution525 ViewsLast Modified:
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                    <<<<
        End Sub

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?
Join the community to see this answer!
Join our exclusive community to see this answer & millions of others.
Unlock 1 Answer and 4 Comments.
Join the Community
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 4 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros