hello again :)
heres the code for declare button:
Sub table_load()
Dim CMD As OleDb.OleDbCommand = New OleDb.OleDbCommand("Select * from tblnumber", con)
Dim rd As OleDbDataReader = CMD.ExecuteReader()
If rd.HasRows() Then
Dim pos As New Point(5, 5)
Dim sz As New Size(50, 50)
Do While rd.Read()
Dim tblnum As New Button
tblnum.Name = "" & rd.Item("ID").ToString()
tblnum.Text = tblnum.Name
tblnum.Size = sz
tblnum.Location = pos
listtable.Controls.Add(tblnum)
listtable.ScrollAlwaysVisible = True
listtable.HorizontalScrollbar = True
Dim xpos As Integer
Dim i As Integer
Math.DivRem(i, 2, xpos)
If (xpos = 0) Then
pos.X = tblnum.Left + tblnum.Width + 5
Else
pos.X = 5
pos.Y = tblnum.Top + tblnum.Height + 5
End If
Loop
End If
rd.Close()
CMD.Dispose()
End Sub
[ listtable.ScrollAlwaysVisible = True listtable.HorizontalScrollbar = True
, i put this code hoping for scrollbar, please see the photo below to understand more, im not really fluent in english
[i want the other button to be in below of number 1 button]