Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

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?

  • Administrators
Posted

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.

Posting Guidelines FAQ Post Formatting

 

Intellectuals solve problems; geniuses prevent them.

-- Albert Einstein

Posted

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.

  • 1 month later...
Posted

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

Posted
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 :)
Fat kids are harder to kidnap

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...