|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
How to use OCX?was an INI file with it. I right-clicked the INI file and chose "Install" and rebooted. I then created a new VB project and added a reference to the OCX. I tried to create an instance of the OCX via "dim MyOCX as new ActiveGS". When I run the program I get: An unhandled exception of type 'System.Runtime.InteropServices.COMException' occurred in ActiveGS.NET.exe Additional information: COM object with CLSID {052DF14F-6F28-44A0-9130-294FDA6176EB} is either not valid or not registered. In VB6, this OCX appears in the toolbox and I can drag it onto the form as it has a UI. So, in VB.NET, can this appear in the toolbox as a drop-in control? Or how could I go about using this OCX in VB.NET? Thanks. once the refernce is added you should be able to access it directly
through the RCW. for example, I have a project that references mshtml.dll. I use it with code like this: Dim htmldoc2 As mshtml.IHTMLDocument2 htmldoc2 = CType(WebBrowser1.Document.DomDocument, mshtml.IHTMLDocument2) which is not your exact case, but may point you in the right direction... why do you want to host an Apple ][gs emulator in .NET? > Something to do...why not?> why do you want to host an Apple ][gs emulator in .NET? > Actually, I've hit another snag. I figured out that I needed to register the file using regsvr32. I got past the original problem and I can instantiate the object, but when I call any visible method, I get "Catastrophic Failure" with no further explanation. Could be this OCX is not compatible? Or maybe I need to use Interop to work with it? Hi,
>> I tried to create an instance of the OCX via "dim MyOCX as newActiveGS". << After registering the OCX, add it to the ToolBox and drop in on a form. This creates the wrapper DLL that .NET needs. Then, just use the methods, properties and events in the same way you would in a VB6 project. Do not attempt to create it at runtime (as in your code). Dick -- Richard Grier (Microsoft Visual Basic MVP) See www.hardandsoftware.net for contact information. Author of Visual Basic Programmer's Guide to Serial Communications, 4th Edition ISBN 1-890422-28-2 (391 pages) published July 2004. See www.mabry.com/vbpgser4 to order.
Check if Stored Procedure already exists in Access Database?
"Selecting" from a data table Strangest damn error - database at fault? CRC checksum algorithm WebBrowser control error Directinput Dir Function just stopped working! How to link to a dll in vb.net Finding a webservice server weird problem with XMLSerializer |
|||||||||||||||||||||||