29-09-13, 06:06 PM
هذا الكود لأضافة عنصر تحكم جديد
طبعا يتم تغيير عنصر التحكم على حسب ما تريد فمثلا لو أردت Label قم بوضعها بدلا من Button هكذا
وقم بتغيير نص الأدا ة للنص الذي تريده
كود :
Dim controlLocation As New Point(10, 50)
Dim s As New Button
s.Name = "Button1"
s.Text = "Text"
s.Location = New Point(controlLocation.X + 150, controlLocation.Y)
controlLocation.Y += s.Height + 5
Me.Controls.Add(s)كود :
Dim newlabel As New Label