Write a program with four or five different controls of various types, including a label called 'lblClicked'. Write a routine that takes a control as an argument and displays in 'lblClicked' the name and type of the control, such as: "You clicked Command 1, a CommandButton." Implement the functionality so that the label always displays the last control pressed.
2. Create a new project with a single CommandButton labeled 'Turn on system'. Create a class for the project called clsSwitch. Add a single property to clsSwitch and a Boolean called State. Implement the following functionality:
When the user clicks the button, the State value switches from True to False or False to True. If the value is True, the caption should read 'Turn off system'. If the value is False, the caption should read 'Turn me on'.
1) Complete and fully-functional working program In Visual Basic 6.0 in executable form as well as complete source code of all work done.
Windows XP, 98, 2000