Professional Documents
Culture Documents
Problema Nr2 - Visual Basic
Problema Nr2 - Visual Basic
' the following variables will hold the user first and last name if found.
'if found:
While dr.Read
userFound = True
End While
'checking the result
If userFound = True Then
Form2.Show()
Else
MsgBox("Sorry, username or password not found", MsgBoxStyle.OkOnly, "Invalid Login")
End If
myConnection.Close()
End Sub
End Class
End Sub
Private Sub TextBox1_TextChanged(sender As Object, e As EventArgs) Handles
TextBox1.TextChanged
End Sub
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
v = TextBox1.Text
'alocam un numar fisierului
Dim nrF As Integer = FreeFile()
'deschidem fisierul in modul Ouput - pt creare
FileOpen(nrF, "f:\fis1.txt", OpenMode.Output)
'scriem in fisier linie cu linie
'antetul
n = Len(v)
PrintLine(nrF, "Prelucrare text", TAB(20), v.ToString)
PrintLine(nrF, "Cuvant", TAB(20), "Numar de apariti")
End If
Next
FileClose(nrF)
End Sub
End Class