you say you Thought of it... you didnt actually try out the code?


Quote Originally Posted by kevin hash View Post
Hi,

I want to make several linklabels for some links I have in a DB. I want the program make a new linklabel for each link automatically.

I thought of something like this:
vb Code:
  1. static counter as integer
  2. Static point As Point
  3.  
  4. point.X = 50
  5. point.Y = 70
  6.  
  7. For Each dtrDatarowDVDs In objdtsAantalPerCategorie.tblCategorieën
  8.      Dim linklabel(number of the counter) As New LinkLabel
  9.    
  10.      linklabel(number of the counter).Text = dtrDatarowDVDs.GetChildRows("tblDVDstblLinks").item("hyperlink")
  11.      linklabel(number of the counter).Location = New Point(point.X, point.Y + 30)
  12.      linklabel(number of the counter).Size = New Size(30, 30)
  13.      Me.Controls.Add(linklabel(number of the counter))
  14.  
  15. Next
So what I want is that all my link stand under eachother. I don't know if I need a different label name for every linklabel.

Maybe someone can help me