Program has already been opened earlier

mrgcat

New Member
Hi

I am useing microsoft visual basic 2010 and i have a question
Code:
Option Infer On

Public Class Form1
    Dim serial = "1232-1234"

    Private Sub TextBox1_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TextBox1.TextChanged
            Label2.Hide()
            Label3.Hide()
            If TextBox1.Text = serial Then
                Label2.Show()
                Label3.Hide()
            Else
                Label2.Hide()
                Label3.Show()

            End If
    End Sub
    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

    End Sub
    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        If TextBox1.Text = serial Then
            Me.Hide()
            MsgBox("Thanks for choosing Webapple", MsgBoxStyle.OkOnly, "Thank You")
            Webapple.Show()
        Else
            MsgBox("Invalid serial number!", MsgBoxStyle.OkOnly, "Invalid Serial!")
        End If
    End Sub

How can i say in the program if the program has been opened before it will skip the serial part and go straight into the main Webapple.

P.S. Yes i did write all of this, and I am only 12 and Webapple is my own personal browser made in vb 2010 :D
 
windows form
This is old code for a program i developed, I updated it to read/write to the registry. It changes a string value. I have another program, called Webapple which is my personal browser, and if the string value is a certain value, then Webapple works but otherwise it will come up saying please run registration.exe and then closes :D

You probably didn't want to know half of it. But..... oh well
 
You could also make that users cannot open your program more then one time.
Because if some of your windows are hidden,users may think that program is off and they will open it again.So just make your program to not be able to be opened more then once and if the user tryes to open it for the second time,give them a message that your program is already running...
 
I understand what your saying, but the average user might not have the knowledge to edit their registry so to speak.
But maybe those who want to edit their registry and who know how, might want to use a similar program you've created.
But hey its just personal choice on what to create.
 
Back
Top