Kod ile buton oluşturma Vb.Net

Kod ile buton oluşturma Vb.Net

**  Form1 yüklendiğinde belirtilen boyutta , belirtilen koordinata buton oluşturulur.

[code lang=”vb”]Public Class Form1

Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

Dim dugme As New Button()

dugme.Top = 50

dugme.Left = 70

dugme.Width = 100

dugme.Text = "Buton1"

Me.Controls.Add(dugme)

End Sub

End Class

[/code]

Yorumlar 4

Bir yanıt yazın

E-posta adresiniz yayınlanmayacak. Gerekli alanlar * ile işaretlenmişlerdir