Click here to Skip to main content
15,911,035 members
Home / Discussions / Visual Basic
   

Visual Basic

 
AnswerRe: clr20r3 problem Pin
Dave Kreskowiak17-Oct-09 5:56
mveDave Kreskowiak17-Oct-09 5:56 
GeneralRe: clr20r3 problem Pin
TheComputerMan17-Oct-09 12:12
TheComputerMan17-Oct-09 12:12 
GeneralRe: clr20r3 problem Pin
Dave Kreskowiak17-Oct-09 15:21
mveDave Kreskowiak17-Oct-09 15:21 
GeneralRe: clr20r3 problem Pin
TheComputerMan18-Oct-09 1:27
TheComputerMan18-Oct-09 1:27 
GeneralRe: clr20r3 problem Pin
Dave Kreskowiak18-Oct-09 2:15
mveDave Kreskowiak18-Oct-09 2:15 
GeneralRe: clr20r3 problem Pin
Eddy Vluggen18-Oct-09 0:45
professionalEddy Vluggen18-Oct-09 0:45 
AnswerRe: clr20r3 problem Pin
0x3c017-Oct-09 6:43
0x3c017-Oct-09 6:43 
QuestionSerial code login Pin
offroaderdan16-Oct-09 3:55
offroaderdan16-Oct-09 3:55 
Hi there,

I have a prolem which is quite annoying which one of you right people might be able to tell me how to do very simply Smile | :)

I have a program which i have nearly completed, but to stop piracy i am having a txt file which reads the data from the program to see if the serial number is correct. HOWEVER i got so far however when the serial number is inputted "form2" is loaded and that works fine, but when i reload the program i don't want the CD key login form to re-appear. The form2 appears but in a flash (I have a slow computer so nottice that it is a form2). I have tried editing all aspects of the code but if any body could help me that would be cool

Here is the code if you want to look at it.

I used 1 button
1 text box
1 check box - supposed to be that if this is checked that it doesn't show this form
1 label
1 txt document in the debug\bin\labeled serial.txt


Public Class Form1
    Dim FILE_NAME As String = ("serial.txt")

    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click

        Dim objReader As New System.IO.StreamReader(FILE_NAME)

        Do Until objReader.EndOfStream
            If txtserial.Text = objReader.ReadLine Then
                Startnot.Checked = False

                Form2.Show()
                Me.Hide()
            Else
                Try
                    If txtserial.Text = objReader.ReadLine.Trim Then

                    End If

                Catch Ex As Exception


                End Try
                Label1.Text = "Invalid CDKey"
            End If

        Loop
        objReader.Close()


    End Sub

    Private Sub Form1_Leave(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Leave
        If Me.Visible = False Then
            Form2.Show()
        End If
    End Sub

    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        SetAttr(FILE_NAME, FileAttribute.Normal)
        Dim Dontshow As Boolean

        Dontshow = GetSetting(My.Application.Info.ProductName, "Options", "Dont Show Me", 1)

        If Dontshow = 0 Then
            Form2.Show()
            Call cookies()
            Exit Sub
        End If

        Startnot.Checked = True
    End Sub

    Private Sub Startnot_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Startnot.CheckedChanged
        SaveSetting(My.Application.Info.ProductName, "Options", "Dont Show Me", Startnot.CheckState)
    End Sub

    Private Sub cookies()

        Me.Close()
        My.Forms.Form2.Show()
    End Sub

End Class

AnswerRe: Serial code login Pin
Dave Kreskowiak16-Oct-09 4:50
mveDave Kreskowiak16-Oct-09 4:50 
GeneralRe: Serial code login Pin
offroaderdan16-Oct-09 5:02
offroaderdan16-Oct-09 5:02 
GeneralRe: Serial code login Pin
Dave Kreskowiak16-Oct-09 5:22
mveDave Kreskowiak16-Oct-09 5:22 
GeneralRe: Serial code login Pin
offroaderdan16-Oct-09 5:28
offroaderdan16-Oct-09 5:28 
GeneralRe: Serial code login Pin
offroaderdan16-Oct-09 5:35
offroaderdan16-Oct-09 5:35 
GeneralRe: Serial code login Pin
EliottA16-Oct-09 5:44
EliottA16-Oct-09 5:44 
GeneralRe: Serial code login Pin
EliottA16-Oct-09 5:34
EliottA16-Oct-09 5:34 
GeneralRe: Serial code login Pin
offroaderdan16-Oct-09 5:40
offroaderdan16-Oct-09 5:40 
GeneralRe: Serial code login Pin
EliottA16-Oct-09 5:42
EliottA16-Oct-09 5:42 
GeneralRe: Serial code login Pin
offroaderdan16-Oct-09 5:46
offroaderdan16-Oct-09 5:46 
GeneralRe: Serial code login Pin
Dave Kreskowiak16-Oct-09 5:53
mveDave Kreskowiak16-Oct-09 5:53 
GeneralRe: Serial code login Pin
offroaderdan16-Oct-09 6:01
offroaderdan16-Oct-09 6:01 
GeneralRe: Serial code login Pin
Dave Kreskowiak16-Oct-09 6:49
mveDave Kreskowiak16-Oct-09 6:49 
GeneralRe: Serial code login Pin
Christian Graus16-Oct-09 10:36
protectorChristian Graus16-Oct-09 10:36 
GeneralRe: Serial code login Pin
Dave Kreskowiak16-Oct-09 14:38
mveDave Kreskowiak16-Oct-09 14:38 
AnswerRe: Serial code login Pin
Kschuler16-Oct-09 6:10
Kschuler16-Oct-09 6:10 
GeneralRe: Serial code login Pin
offroaderdan16-Oct-09 6:14
offroaderdan16-Oct-09 6:14 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.