Computer Science, asked by hanu6193, 11 months ago

A click event procedure stud for the label control can be created by

Answers

Answered by tejasgupta
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:

  1. Start a new windows form application project of either vb.net or C# in visual studio, or, open an existing one.
  2. By default, you will see Form1 in the solution explorer, usually positioned top-left on the screen.
  3. On the form, drag a lable from the toolbox, usually located on the left of the screen.
  4. You will see a small piece of text- Lable1, written on that. That is your lable.
  5. Now, double click that lable. A new code window will open with some text by default on it.
  6. In the center of all the four lines of text, type the following code....(that is in bold, italics and underline)......~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  7. MsgBox("This is an example of how to add a lable click event for a windows form application in visual studio.....")~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  8. Now run the application and click the lable.
  9. You will see that a popup shows up when that lable is clicked.

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Similar questions