Computing.Net > Forums > Programming > activation form?

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

activation form?

Reply to Message Icon

Name: go_places_puterwize
Date: November 30, 2007 at 00:25:47 Pacific
OS: Windows vista
CPU/Ram: AMD64 1.8Ghz Dual Core/1G
Product: HP Compaq Presario F700
Comment:

hi, yet again I have a problem,
Im using VB 2008.
Im making an internet tool suite, kind of like net tools, but just a small little set, the thing is, I need it to be activated before someone can use it.

this is what i have :
Private Sub open_button_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles open_button.Click
If Not TextBox1.Text = "403596383" And TextBox2.Text = "324589bs983a983f9823" Then
Dim isolatedStore As IsolatedStorageFile = IsolatedStorageFile.GetStore(IsolatedStorageScope.User Or IsolatedStorageScope.Assembly, Nothing, Nothing)
Dim isoStream As New IsolatedStorageFileStream("act_status.bin", FileMode.OpenOrCreate, FileAccess.Write, isolatedStore)

Using writer As New StreamWriter(isoStream)
writer.WriteLine("Activated=No")
End Using
End If
If TextBox1.Text = "403596383" And TextBox2.Text = "324589bs983a983f9823" Then
Dim isolatedStore As IsolatedStorageFile = IsolatedStorageFile.GetStore(IsolatedStorageScope.User Or IsolatedStorageScope.Assembly, Nothing, Nothing)
Dim isoStream As New IsolatedStorageFileStream("act_status.bin", FileMode.OpenOrCreate, FileAccess.Write, isolatedStore)

Using writer As New StreamWriter(isoStream)
writer.WriteLine("Activated=Yes")
End Using
If TextBox3.Text = "Activated=Yes" Then
Form1.Show()
Me.Hide()
End If
End If
End Sub
---------
I need to know how to make the isolated storage file change only when the infomation is correct, and make it stay like that, not showing the login form on next startup..
If i have to i will send the program via email, but i would like to get the best help here before i go to anything that drastic.
thanks.

Curiousity only injured the cat.
I finished it off..
Muahahaha...



Sponsored Link
Ads by Google

Response Number 1
Name: Razor2.3
Date: December 1, 2007 at 21:25:46 Pacific
Reply:

Ah, what the heck. General answers for general questions:

I need to know how to make the isolated storage file change only when the infomation is correct
Easy enough; just don't write anything to it unless you want to. Simple.

and make it stay like that, not showing the login form on next startup
Then you need to decide how you want your objects to play out. Personally, I'd merge my activation object with my activation form. I'd also expose only one public element, be it a read-only property IsActivated or a function Activate() As Boolean. This property/function would handle the file reading, and making the activation form visible if required.


0
Reply to Message Icon

Related Posts

See More







Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Programming Forum Home


Sponsored links

Ads by Google


Results for: activation form?

Email active form using vb www.computing.net/answers/programming/email-active-form-using-vb/7924.html

C++ keyboard interfacing... www.computing.net/answers/programming/c-keyboard-interfacing/565.html

program background captures keys www.computing.net/answers/programming/program-background-captures-keys/16208.html