29-09-13, 09:11 PM
(29-09-13, 06:06 PM)ismail2012 كتب : هذا الكود لأضافة عنصر تحكم جديدجميل جدا اخي الكريم
طبعا يتم تغيير عنصر التحكم على حسب ما تريد فمثلا لو أردت 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
