License screen

  • Thread starter Thread starter John
  • Start date Start date
J

John

Hi

Is there a way that when the end user runs a vb.net app for the very first
time a license screen pops up asking to agree the license and if user agrees
then screen disappears and never appears again for the lifetime of the
application. The part that I am not sure about is how to ensure that the
screen never come sup again.

Thanks

Regards
 
Hi John,
Never is impossible, but you can put a switch in the registry.
That is easy to do with VB.net
If you have problems with doing that, message again please?
Success
Cor
 
-----Original Message-----
Hi

Is there a way that when the end user runs a vb.net app for the very first
time a license screen pops up asking to agree the license and if user agrees
then screen disappears and never appears again for the lifetime of the
application. The part that I am not sure about is how to ensure that the
screen never come sup again.

Thanks

Regards

Hello
You could use the registry...
Kind Regards
Jorge
 
Hi

Yes, please give an example of how to set the registry and then to check it
later to see if it has already been done.

Many Thanks

Regards
 
Hi John,
I think this is the easiest way.
You will see, that you will later put this in a class, but this is for an
example
And just and example, you have to test it yourself if it works.
I did nothing if the user doen't accept the licence, that you have to do
yourself of course.
\\\\\
Private Sub Form1_Load(ByVal sender As Object, ByVal e As System.EventArgs)
Handles MyBase.Load
Dim Reg As Microsoft.Win32.RegistryKey =
Microsoft.Win32.Registry.CurrentUser
Dim FirstStart As Integer
Reg =
Microsoft.Win32.Registry.CurrentUser.CreateSubKey("Software\John")
FirstStart = CInt(Reg.GetValue("FirstStart"))
If FirstStart = 0 Then
Dim LicenceForm As New Form2
LicenceForm.ShowDialog(Me)
If True = True Then 'Licenceform.OK this you have to change for
sure
Reg.SetValue("FirstStart", 1)
LicenceForm.Dispose()
End If
End If
End Sub
////
I will be glad if you answer me if it did work?
I hope this helps a little bit.
Cor
 
Hi

Is the subkey created every time the application is run? Would this not
overwrite 'firsttime' every time? Should we not check for the existence of
sub key "Software\John" before creating it?

Thanks

Regards
 
John,

This about the registry question. please keep questions to the same thread,
because otherwise other people become confused.

For me my registry answer did work, I tested it, but you would do that
yourself too.

On this newsgroup are no garanties, just advices and help.

I think the only problem can be if there is another company with the name
John, which uses the same keyname

But I should not know how to overcome that.

Cor
 
Back
Top