Jump to content
Xtreme .Net Talk

Recommended Posts

Posted
If you're using VB.Net you can create a Control Class Library, put in a UserControl and use the attribute COMClass and then right-click the project choose Properties go to Configuration Properties>Build and check Register for COM Interop. I'm not sure how to get the component to function, however but it works well on normal classes. There is probably a better way.
.Net allows software to be written for any version of Windows and not break like Unmanaged applications unless using Unmanaged procedures like APIs. If your program uses large amounts of memory but releases it when something else needs it, then what's the problem?
Posted

Hello and thanks. This was helpful, but I am still puzzled: I built a tiny test control component in VB.NET. It has a label with caption "Hello" and one method which shows a message box with "Hello". I followed your advice, and also build some GUIDs so the component would register. I did a build and it created a DLL. I went into VB6, and added the DLL to the references.

 

Now, I can declare a new instance of the DLL library, and of the "control" (if it still is a control). I can call the Hello method and see the message box, but I can't figure out how to get the actual control to show. It does not show up in any tab on the compoenents toolbox, but the fact that a DLL was created rather than an OCX gives me a sinking feeling I'may have lost this little battle, if not the war.

 

Microsoft has a page with a walkthrough for "components" at http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vbcn7/html/vawlkWalkthroughCreatingCOMObjectsWithVisualBasicNET.asp, BUT not mention of the word "Control". Perhaps I am out of luck? Any additional info or ideas on where to look would be greatly appreciated!!! Thanks again.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...