1 / 9

HOW TO CREATE A CLASS

Learn how to create a graphical user interface for a program that inputs a decimal value and displays a tax amount in currency format using a class in VB. Follow step-by-step instructions with code examples.

coreyr
Download Presentation

HOW TO CREATE A CLASS

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Steps: 1. Create a project. Use any meaningful name you want. 2. Create a GUI for a program that inputs a decimal value and displays a tax amount in a currency format: HOW TO CREATE A CLASS

  2. Steps: 3. Enter this code within the button-click code. HOW TO CREATE A CLASS

  3. Steps: 4. Select the project name and right-click on it. HOW TO CREATE A CLASS

  4. Steps: The screen should now look like this. 5. Select Add, then Class. HOW TO CREATE A CLASS

  5. Steps: The screen should now look like this. 6. Select Class below and type in the class name. This example uses clsCalculateSalesTax.vb. HOW TO CREATE A CLASS Don’t forget to press “Add”

  6. Steps: 7. Your screen should now look like the one below. 8. Add the class code here. (See the next slide for the class code.) HOW TO CREATE A CLASS

  7. Steps: 9. After entering the class’s code below, your class should look like this. HOW TO CREATE A CLASS

  8. Steps: 10. The solution explorer should now look like this. Your class has been added to your project and is now a file within your project. HOW TO CREATE A CLASS Your class is here as a“.vb” file.

  9. Steps: 11. Congratulations. You have just written your first class. 12. Next, run your project. It should work. 13. Don’t forget to save your project. HOW TO CREATE A CLASS You must understand this code to be able to do the next program.

More Related