Jump to content

Manipular arraylist com estruturas


Paulo Jorge

Recommended Posts

Boa tarde a todos , estou a criar um programa com arraylist e estruturas que consiste em adicionar login e listar numa listview, eu já fiz a parte de adicionar mas estou agora com duvidas de como fazer para inserir os dados na listview alguém me ajuda ?

código:


   Structure Login
    Dim Username As String
    Dim Password As String
    Dim Nivel As Integer
   End Structure

   Private Sub btnGravar_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnGravar.Click
    Dim lista_Login As New ArrayList
    Dim umLogin As Login
    umLogin.Username = txtUsenrame.Text
    umLogin.Password = txtPassword.Text
    umLogin.Nivel = cboNivel.Text
    lista_Login.Add(umLogin)

   End Sub
   Private Sub btnCancelar_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnCancelar.Click
    Me.Close()
   End Sub
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site you accept our Terms of Use and Privacy Policy. We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.