Netcode 33 Veteran Poster

except there's some incentives to go with it. Like staying young (the vampire myth), being comfortable, never falling sick....and more

Netcode 33 Veteran Poster

Nearly all men can stand adversity,
but if you want to test a mans character,
give him power.”
~ Abraham Lincoln
(1809-1865)

Netcode 33 Veteran Poster

See first, think later, then test. But always see first. Otherwise you will only see what you were expecting. Most scientists forget that.
-Douglas Adams

Netcode 33 Veteran Poster

Data is not information, Information is not knowledge, Knowledge is not understanding, Understanding is not wisdom.

Cliff Stoll & Gary Schubert

Netcode 33 Veteran Poster

okay now. I got it to work, it was an omission on my part, did not change the 'Copy to output Directory' property of the html doc to 'Copy if newer'.

To add to Unhnd Exception's post,
> you need to add the following references from the .NET library:
windows base
presentation core
presentation framework
> Correction to one of cwarn23's points: its the 'Copy to Directory' property of the html doc that should be changed to 'Copy if Newer' and not the 'Build Action' property

Every other thing works just perfectly.
Thanks Unhnd Exception

Netcode 33 Veteran Poster

Added the three references from the .NET library as requested in the error message and i had a successful run but the form is blank. Cant see any map but i noticed the 'Delete markers' in the left-bottom corner

Netcode 33 Veteran Poster

Always be a first-rate version of yourself,
instead of a second-rate version of somebody else.

Netcode 33 Veteran Poster

check here for all connection strings

Netcode 33 Veteran Poster

check here

ErnestSeeker commented: good +0
Netcode 33 Veteran Poster

Just learnt that Shanti C wants to know what i learnt today

Netcode 33 Veteran Poster

A flatterer is a friend who is your inferior, or pretends to be so - Aristotle

Netcode 33 Veteran Poster

“Doing what you like is freedom.
Liking what you do is happiness.”

~ Frank Tyger

wenbnet commented: nice +0
Shanti C commented: yes,nice quote!!!! +0
Netcode 33 Veteran Poster

"History is written by the victors." -Machiavelli

Netcode 33 Veteran Poster

I do believe there are things worth dying for, but the dude is obviously in the wrong. You don't just kill people to promote a book! Unless the book is going to save the world, but somehow I doubt that if we don't read it the world will split in half and shoot demons from it's core (hey that might be a cool book).

Shooter = Crazy.

to me, the guy is a frustrated soul. Maybe he felt he has done something so good and worth recognition but the world was not just giving him the attention he deserved. Well, lets not be biased judges, maybe we should all read the book

Netcode 33 Veteran Poster

here is a good working code block:

Imports System.Math

Public Class calculator

    Dim cleardisplay As Boolean
    Dim operand1 As Double
    Dim operand2 As Double
    Dim Operator1 As String

    Private Sub Digit_Click(ByVal sender As System.Object, _
        ByVal e As System.EventArgs) Handles btn1.Click, btn2.Click, _
            btn3.Click, btn4.Click, btn5.Click, btn6.Click, _
            btn7.Click, btn8.Click, btn9.Click, btn0.Click
        If cleardisplay Then
            txtDisplay.Text = ""
            cleardisplay = False
        End If
        txtDisplay.Text = txtDisplay.Text + sender.Text
    End Sub

    Private Sub btnPeriod_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnPeriod.Click
        If txtDisplay.Text.IndexOf(".") > 0 Then
            Exit Sub
        Else
            txtDisplay.Text = txtDisplay.Text & "."
        End If
    End Sub

    Private Sub btnClear_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnClear.Click
        txtDisplay.Text = ""
    End Sub

    Private Sub btnEquals_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnEquals.Click

        Dim result As Double
        operand2 = Val(txtDisplay.Text)
        Select Case Operator1
            Case "+"
                result = operand1 + operand2
            Case "-"
                result = operand1 - operand2
            Case "*"
                result = operand1 * operand2
            Case "/"
                If operand2 <> "0" Then result = operand1 / operand2
        End Select
        txtDisplay.Text = result
        cleardisplay = True
    End Sub

    Private Sub btnAdd_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnAdd.Click
        operand1 = Val(txtDisplay.Text)
        Operator1 = "+"
        cleardisplay = True
    End Sub

    Private Sub btnPrefix_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnPrefix.Click
        txtDisplay.Text = -Val(txtDisplay.Text)
        cleardisplay = True
    End Sub

    Private Sub btnInvers_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnInverse.Click
        If Val(txtDisplay.Text) <> 0 Then txtDisplay.Text = 1 / Val(txtDisplay.Text)
        cleardisplay = True …
AndreRet commented: Nice post! +4
ErnestSeeker commented: perfect for me +0
Netcode 33 Veteran Poster

chris, first you need to make a connection to sql server and then you can access the particular dbase and rable from which you want to perform user verification as in my codes below

Private Sub btnOk_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnOk.Click

        Try

            'variable to hold connectionstring 
            Dim objconnection As SqlConnection = New  _
                 SqlConnection("Server=localhost;Database=MSS;" & _
                    "user ID = sa; password = clement;")

            objconnection.Open() 'open connection to server 

            'this is the SQL select statement query that is performed
            ' to read the username and password from server 
            Dim SelectStmt As String = "SELECT * FROM Login WHERE User_Name ='" + txtUsername.Text + "' and " + _
                                "Password ='" + txtPassword.Text + "'"

            Dim objcommand As SqlCommand = New SqlCommand(SelectStmt, objconnection)
            
            Dim reader As SqlDataReader = objcommand.ExecuteReader

            If reader.Read Then

                              Me.Dispose()


            Else

                'integer variable to count the number of times
                'the user has tried loggin in
                Static count As Integer = 0

                'display promt 
                Dim prompt As DialogResult = _
                MessageBox.Show("Invalid Username or Password!", "Login Error", _
                MessageBoxButtons.RetryCancel, MessageBoxIcon.Warning)

                Select Case prompt

                    Case Windows.Forms.DialogResult.Retry
                        'keep login displayed for another trial 
                        txtUsername.Text = ""
                        txtPassword.Text = ""

                        count += 1 'increment counter by one 
                        If count = 3 Then
                            MessageBox.Show("High value of failed login attempts" & vbCrLf & _
                                           "Application will be terminated" & _
                                        " for security reasons", "Error", MessageBoxButtons.OK, _
                                        MessageBoxIcon.Stop)
                            End 'terminate application
                        End If

                    Case Windows.Forms.DialogResult.Cancel
                        Application.Exit()  'terminate application

                End Select

            End If
        Catch ex As Exception

        End Try
    End Sub