jahuer1 Posted October 24, 2003 Posted October 24, 2003 I have a problem accessing the ActiveX control msmask32.ocx when creating MaskedEdit-components dynamically. The program has to run on a machine where only the .NET-Framework is installed. The msmask32.ocx is registered. Static programed MaskedEdit's work fine there. (On my machine with the dev.env. no problem occurs!) This is my class: Public Class QuestTextPanel Inherits System.Windows.Forms.Panel ... Private Sub init(ByVal qNr As Integer) ... Select Case question.kind ... Case 3 Dim dateText As AxMSMask.AxMaskEdBox = _ New AxMSMask.AxMaskEdBox dateText.Parent = Me dateText.Mask = "####-##-##" ... End Select End Sub Here the following error occurs: "You do not have a licence to use this ActiveX Control!" Where is the bug? Quote
Administrators PlausiblyDamp Posted October 24, 2003 Administrators Posted October 24, 2003 No bug - it's as the error says you don't have a licence to use the control at design time. The control shipped as part of VB6 - you will need VB6 installed on the same machine as your VS.Net ide to get it to work. Also you may need to check the EULA to see if you are legally allowed to redistribute the control depending on how you aquire your copy of VB6. Quote Posting Guidelines FAQ Post Formatting Intellectuals solve problems; geniuses prevent them. -- Albert Einstein
jahuer1 Posted October 24, 2003 Author Posted October 24, 2003 I think this is not quite the point. Everything works fine I use the MaskedEdit hardcoded: means I put a MaskedEdit at design-time on my form. My problem occurs when I want to create it dynamically at run time! The bug is at the line (see initial text, too): dateText.Mask = "####-##-##" VB.NET help file says this is possible. Quote
ander Posted December 2, 2003 Posted December 2, 2003 I have been having the same problem with MSComm32.ocx. After reading what you said about making the control at runtime, as I have been doing, I tried newing it up at declaration. It works!!!! Cheers, Ander :D Quote
iebidan Posted December 2, 2003 Posted December 2, 2003 ActiveX is unmanaged code, so try not to use it in .NET apps, you can find controls that can emulate the masked edit control, but the .NET way, try looking for it in Planet Source Code or Code Project, even better, code your own control, will be fun for you, and then you can post it :) Quote Fat kids are harder to kidnap
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.