NET.Įven types with the same name are different. The entry points built by the compiler are not similar.ĪctiveX controls use Variant variables that are not use in. It's not because you can register it with COM that it is an ActiveX control. NET dll / control in an ActiveX environment, but that does not make it an ActiveX control. NET unless you uses C++ that permits unmanaged code. If you look at the real stuff, it is not possible to create an ActiveX control in. Public Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.ClickĪll this is a question of semantics. Private Sub UserControl1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Private Shared Sub ComUnregister(ByVal t As Type) ' This is called when unregistering (no need to change it) Private Shared Sub ComRegister(ByVal t As Type)ĭim keyName As String = "CLSID\\" & t.GUID.ToString("B")ĭim key As RegistryKey = (keyName, True)ĭim subkey As RegistryKey = key.CreateSubKey("MiscStatus")ĭim libid As Guid = Marshal.GetTypeLibGuidForAssembly(t.Assembly)ĭim ver As Version = t.Assembly.GetName().Versionĭim version As String = String.Format("", ver.Major, ver.Minor) ' This function is called when registered (no need to change it)
'You should create your own 3 GUIDS using GuidGen ' clients will no longer be able to access the class. ' These GUIDs provide the COM identity for this class ' MAKE SURE WE HAVE 1 PUBLIC SUB in this class