[Migrated content. Thread originally posted on 16 February 2005]
I am using a VB.NET class (as an activex object) in a cobol program. The VB class eventually shows a windows form. The problem is that the form never receives focus...it always appears behind my cobol window.I think I need to pass the handle of the cobol window to the VB class so I can set the cobol window as the owner of the vb form.
I added a property to the vb class of type object. This property appears as a type 12 variant in the def file for the class.
PROPERTY-PUTREF, 1610743810, @OwnerForm,
"VARIANT (Property Value)", TYPE 12
When I try to set this property from cobol with the cobol window handle, I get a memory access violation.
I am using INQUIRE WINDOW SYSTEM HANDLE to get the handle of the cobol window. I have tried passing the handle and passing a variant set to the value of that handle...neither work.
Any ideas?



