program to change height and width of image using get () and set () property.
-----------------------------------------code---------------------------------------------------------Public Class Class1
Public hei, wid As Integer
Public Property height() As Integer
Get
Return hei
End Get
Set(ByVal value As Integer)
hei = value
End Set
End Property
Public Property width() As Integer
Get
Return wid
End Get
Set(ByVal value As Integer)
wid = value
End Set
End Property
End Class
Public Class Form1
Dim b, c As Integer
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim a As New Class1
a.height = Val(TextBox1.Text)
a.width = Val(TextBox2.Text)
b = a.height
c = a.width
PictureBox1.Height = b
PictureBox1.Width = c
End Sub
End ClassSonata Ocean Analog Watch - For Men(Black)
-----------------------------------------output----------------------------------------------------
codestrew |
No comments:
Post a Comment