Quantcast
Channel: Programming Forums
Viewing all articles
Browse latest Browse all 51036

i wanted to enter once only in to my button

$
0
0
i just wanted to enter once in my button how can i do it .. can anyone can give idea to that. or it can be possible to that. here is my code
Public Class Form1

    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        Dim a As Integer
        Application.DoEvents()
        For a = 1 To 5
            ' If ListBox2.SelectedItems.Count = false Then
            ListBox2.Items.Add(a * a.ToString())


            'End If
        Next a
    End Sub
    

    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        Dim a As Integer
        Application.DoEvents()
        For a = 1 To 5
            ListBox1.Items.Add(a.ToString())
        Next a
    End Sub
End Class


Viewing all articles
Browse latest Browse all 51036

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>