Infralution Support Forum Index Infralution Support
Support groups for Infralution products
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Types not working - help

 
Post new topic   Reply to topic    Infralution Support Forum Index -> Licensing Support
View previous topic :: View next topic  
Author Message
Renegade



Joined: 30 Apr 2005
Posts: 45

PostPosted: Sun May 01, 2005 9:48 am    Post subject: Types not working - help Reply with quote

Hello,

I'm using sample code and getting errors:

Code:
        If Not LicenseManager.IsValid(GetType(MainForm), Me, theLicense) Then
            ' if there is no valid license then display the standard license install form
            ' to allow the user to enter a license key
            '
            Dim licenseForm As New LicenseInstallForm
            theLicense = licenseForm.ShowDialog("My App", "Site.com", GetType(MainForm_App))
        End If

I'm getting the blue squiggly line errors here:
Code:
If Not LicenseManager.IsValid(GetType(MainForm_App), Me, ***theLicense***) Then

"Value of type 'MainForm.License' cannot be converted to 'System.componentModel.License'."

and here

Code:
theLicense = ***licenseForm.ShowDialog("My App", "Site.com", GetType(MainForm_App))***

"Value of type 'Infralution.Licensing.EncryptedLicense' cannot be converted to 'MainForm.License'."

The class name is MainForm_App and the namespace is MainForm.

I don't know why it won't work for me. Can someone give me a hand? Testing inside the app I want to protect is the last thing on my todo list before buying.

I should probably add that the sample app worked, and that once I started putting the sample code into the real app, things stopped working. The above is as far as I got.

Thanks,

Ryan
Back to top
View user's profile Send private message
Infralution



Joined: 28 Feb 2005
Posts: 5027

PostPosted: Sun May 01, 2005 10:59 pm    Post subject: Reply with quote

Looks like your declaration of the variable theLicense is incorrect. It seems you may have defined your own license type MainForm.License? The declaration should be something like:

Dim theLicense As System.ComponentModel.License = Nothing

Using the full type name will ensure you don't get any potential issues with other referenced libraries declaring a type "License".

If you are still having problems then post your code that declares the variable.
_________________
Infralution Support
Back to top
View user's profile Send private message Visit poster's website
Renegade



Joined: 30 Apr 2005
Posts: 45

PostPosted: Mon May 02, 2005 3:35 am    Post subject: I'll check as soon as possible Reply with quote

Thanks for the quick answer. I'll check on it and post back on the results.

Thanks again,

Ryan
Back to top
View user's profile Send private message
Renegade



Joined: 30 Apr 2005
Posts: 45

PostPosted: Mon May 02, 2005 9:06 am    Post subject: TADA~! Reply with quote

Squiggles are gone!

You hit it perfect. I was getting super-frustrated trying to find a licensing component that would do what I wanted, and started my own... Gone now.

Thanks,

Ryan
Back to top
View user's profile Send private message
Renegade



Joined: 30 Apr 2005
Posts: 45

PostPosted: Mon May 02, 2005 9:32 am    Post subject: EXSTATIC! Reply with quote

After monkeying around for 5 minutes and trying a couple things, I bought it.

I am so entirely fucking exstatically happy to have FINALLY found a .NET component that does what I want it to do.

Thanks!

Ryan
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Infralution Support Forum Index -> Licensing Support All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group