A click event procedure stud for the label control can be created by
Answers
Answered by
1
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Lable control is a control in visual studio for desktop applications, usually used to display some text an the application window. But, however, a Lable has several events such as click, hover, mouse-in, mouse-out, double-click and so on....
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In visual basic, or C#, you can easily create a label and set what it does easily. To do so, follow these steps:
- Start a new windows form application project of either vb.net or C# in visual studio, or, open an existing one.
- By default, you will see Form1 in the solution explorer, usually positioned top-left on the screen.
- On the form, drag a lable from the toolbox, usually located on the left of the screen.
- You will see a small piece of text- Lable1, written on that. That is your lable.
- Now, double click that lable. A new code window will open with some text by default on it.
- In the center of all the four lines of text, type the following code....(that is in bold, italics and underline)......~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- MsgBox("This is an example of how to add a lable click event for a windows form application in visual studio.....")~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- Now run the application and click the lable.
- You will see that a popup shows up when that lable is clicked.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Similar questions
English,
7 months ago
Biology,
7 months ago
Accountancy,
1 year ago
Math,
1 year ago
Social Sciences,
1 year ago