0% found this document useful (0 votes)
41 views1 page

Exercise 11

This code defines a class called Form1 with a private subroutine that handles clicks on a label control. When the label is clicked, it changes the label's text to "Pardeep", sets its location, background and foreground colors, font, and disables automatic sizing.

Uploaded by

api-307933689
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
41 views1 page

Exercise 11

This code defines a class called Form1 with a private subroutine that handles clicks on a label control. When the label is clicked, it changes the label's text to "Pardeep", sets its location, background and foreground colors, font, and disables automatic sizing.

Uploaded by

api-307933689
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 1

Exercise 11

Public Class Form1


Private Sub Label1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)
Handles Label1.Click
With (Me.Label1)
.Text = "Pardeep"
.AutoSize = False
.Location = New Point(180, 180)
.BackColor = Color.Gold
.ForeColor = Color.IndianRed
.Font = New Font(.Name, 12, FontStyle.Bold)
End With
End Sub
End Class

You might also like