View previous topic :: View next topic |
Author |
Message |
Renegade
Joined: 30 Apr 2005 Posts: 45
|
Posted: Sun May 01, 2005 9:48 am Post subject: Types not working - help |
|
|
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 |
|
|
Infralution
Joined: 28 Feb 2005 Posts: 5027
|
Posted: Sun May 01, 2005 10:59 pm Post subject: |
|
|
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 |
|
|
Renegade
Joined: 30 Apr 2005 Posts: 45
|
Posted: Mon May 02, 2005 3:35 am Post subject: I'll check as soon as possible |
|
|
Thanks for the quick answer. I'll check on it and post back on the results.
Thanks again,
Ryan |
|
Back to top |
|
|
Renegade
Joined: 30 Apr 2005 Posts: 45
|
Posted: Mon May 02, 2005 9:06 am Post subject: TADA~! |
|
|
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 |
|
|
Renegade
Joined: 30 Apr 2005 Posts: 45
|
Posted: Mon May 02, 2005 9:32 am Post subject: EXSTATIC! |
|
|
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 |
|
|
|