|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
COMM Class(.dll) into VB6. I followed these instructions To create a COM object using the COM class template 1.. Open a new Windows Application project from the File menu by clicking New Project. 2.. In the New Project dialog box under the Project Types field, check that Windows is selected. Select Class Library from the Templates list, and then click OK. The new project is displayed. 3.. Select Add New Item from the Project menu. The Add New Item dialog box is displayed. 4.. Select COM Class from the Templates list, and then click Add. Visual Basic adds a new class and configures the new project for COM interop. 5.. Add code such as properties, methods, and events to the COM class. 6.. Select Build ClassLibrary1 from the Build menu. Visual Basic builds the assembly and registers the COM object with the operating system. Hello Lou
Does your class expose a public sub new ?? cause this is required for a COM class Regards Michel Posseth [MCP] Show quoteHide quote "Lou" <lou.gar***@comcast.net> schreef in bericht news:eaWemisAHHA.4672@TK2MSFTNGP02.phx.gbl... >I created a comclass from VB .NET 2005 but it fails when I try to load it >(.dll) > into VB6. > I followed these instructions > To create a COM object using the COM class template > 1.. Open a new Windows Application project from the File menu by clicking > New Project. > > 2.. In the New Project dialog box under the Project Types field, check > that Windows is selected. Select Class Library from the Templates list, > and > then click OK. The new project is displayed. > > 3.. Select Add New Item from the Project menu. The Add New Item dialog > box > is displayed. > > 4.. Select COM Class from the Templates list, and then click Add. Visual > Basic adds a new class and configures the new project for COM interop. > > 5.. Add code such as properties, methods, and events to the COM class. > > 6.. Select Build ClassLibrary1 from the Build menu. Visual Basic builds > the assembly and registers the COM object with the operating system. > > > yes it does?
Show quoteHide quote "Michel Posseth [MCP]" <M***@posseth.com> wrote in message news:u6yhE5vAHHA.3536@TK2MSFTNGP03.phx.gbl... > Hello Lou > > Does your class expose a public sub new ?? > > cause this is required for a COM class > > Regards > > Michel Posseth [MCP] > > > "Lou" <lou.gar***@comcast.net> schreef in bericht > news:eaWemisAHHA.4672@TK2MSFTNGP02.phx.gbl... >>I created a comclass from VB .NET 2005 but it fails when I try to load it >>(.dll) >> into VB6. >> I followed these instructions >> To create a COM object using the COM class template >> 1.. Open a new Windows Application project from the File menu by >> clicking >> New Project. >> >> 2.. In the New Project dialog box under the Project Types field, check >> that Windows is selected. Select Class Library from the Templates list, >> and >> then click OK. The new project is displayed. >> >> 3.. Select Add New Item from the Project menu. The Add New Item dialog >> box >> is displayed. >> >> 4.. Select COM Class from the Templates list, and then click Add. Visual >> Basic adds a new class and configures the new project for COM interop. >> >> 5.. Add code such as properties, methods, and events to the COM class. >> >> 6.. Select Build ClassLibrary1 from the Build menu. Visual Basic builds >> the assembly and registers the COM object with the operating system. >> >> >> > > some tips :
1. you must have a sub new in your to COM exposed class ( the constructor must be without parameters ) Public Sub New() MyBase.New() End Sub 2. provide your own id`s ClassId , InterfaceId and EventsId register the dll with Regasm instead of regsvr here an example http://groups.google.com/group/microsoft.public.dotnet.languages.vb/browse_thread/thread/b9974554b8d68a52/ca996d74d250974e?lnk=st&q=michel+posseth+COM+VB.Net&rnum=28#ca996d74d250974e regards Michel Posseth [MCP] Show quoteHide quote "Lou" <lou.gar***@comcast.net> schreef in bericht news:usSeyQBBHHA.1012@TK2MSFTNGP04.phx.gbl... > yes it does? > > "Michel Posseth [MCP]" <M***@posseth.com> wrote in message > news:u6yhE5vAHHA.3536@TK2MSFTNGP03.phx.gbl... >> Hello Lou >> >> Does your class expose a public sub new ?? >> >> cause this is required for a COM class >> >> Regards >> >> Michel Posseth [MCP] >> >> >> "Lou" <lou.gar***@comcast.net> schreef in bericht >> news:eaWemisAHHA.4672@TK2MSFTNGP02.phx.gbl... >>>I created a comclass from VB .NET 2005 but it fails when I try to load it >>>(.dll) >>> into VB6. >>> I followed these instructions >>> To create a COM object using the COM class template >>> 1.. Open a new Windows Application project from the File menu by >>> clicking >>> New Project. >>> >>> 2.. In the New Project dialog box under the Project Types field, check >>> that Windows is selected. Select Class Library from the Templates list, >>> and >>> then click OK. The new project is displayed. >>> >>> 3.. Select Add New Item from the Project menu. The Add New Item dialog >>> box >>> is displayed. >>> >>> 4.. Select COM Class from the Templates list, and then click Add. >>> Visual >>> Basic adds a new class and configures the new project for COM interop. >>> >>> 5.. Add code such as properties, methods, and events to the COM class. >>> >>> 6.. Select Build ClassLibrary1 from the Build menu. Visual Basic builds >>> the assembly and registers the COM object with the operating system. >>> >>> >>> >> >> > > Lou wrote:
> I created a comclass from VB .NET 2005 but it fails when I try to load it Give us a hint. What do you mean by "it fails"? Is there an error> (.dll) > into VB6. message? Does the class show up on the references page in VB6? Some information about the actual problem would be helpful. Error "Can' add a reference to the specified file"
Show quoteHide quote "Chris Dunaway" <dunaw***@gmail.com> wrote in message news:1162995977.115653.4630@b28g2000cwb.googlegroups.com... > Lou wrote: >> I created a comclass from VB .NET 2005 but it fails when I try to load it >> (.dll) >> into VB6. > > Give us a hint. What do you mean by "it fails"? Is there an error > message? Does the class show up on the references page in VB6? Some > information about the actual problem would be helpful. >
collection object not showing properties of stored object?
asp.net "the object is currently in use elsewhere" Hashtable and TreeView ? Error Loading UserControl Problem sending mail custom date formats Balloons on system tray icon how to overwrite console.write? csv file help Printing a document in XSL using VB.NET |
|||||||||||||||||||||||