Hi

Program for Leap Year in Visual Basic (Project 3)

SHARE:

Program for Leap Year in Visual Basic
Step 1: –
  • At first open Visual Basic 0 application software
  • Then click on or select ‘Standard EXE’ icon from New Project dialogue box
  • Then click on ‘Open’.
Step 2: –
Form design: –
Select necessary Control Tool from Tool Box and adjust the position to ‘Form Window’: –
  • Two Label Box
  • Two TextBox
  • Two Command Box

Program for Leap Year in Visual Basic (Project 3)



    Step 3: –

    Properties Settings: –
    • Select ‘Form1’from Form Window and select ‘Caption’ from Properties Window
    • Then replace ‘Form1’ to ‘Leap Year or Non-Leap Year Project’ from the properties window
    • Then select ‘Label1 box’ from Form Window and select ‘Caption’ from Properties Window
    • Then replace ‘Label1’ to ‘Input any Year’ from Properties Window
    • Then select ‘Label 2 box’ from Form Window and select ‘Caption’ from Properties Window
    • Then replace ‘Label 2’ to ‘Result’ from Properties Window
    • Then select ‘Text1 box’ from Form Window and select ‘Text’ from Properties Window
    • Then remove or erase ‘Text1’ from Properties Window
    • Then select ‘Text 2 box’ from Form Window and select ‘Text’ from Properties Window
    • Then remove or erase ‘Text 2’ from Properties Window
    • Then select ‘Command1 box’ from Form Window and select ‘Caption’ from Properties Window
    • Then replace ‘Command1’ to ‘Calculate’ from Properties Window.
    • Then select ‘Command 2 box’ from Form Window and select ‘Caption’ from Properties Window
    • Then replace ‘Command 2’ to ‘Clear’ from Properties Window.







    Step 4: –
    Code writing:-
    • Double click on ‘Calculate button’ or ‘Command 1 box’
    • Then input code to Command 1 code box
    Code: – Dim A as Integer
                 A = Val (Text1.Text)
                 If A Mod 4 = 0 then
             `   Text2.Text = “LEAP YEAR”
                 Else
                 Text2.Text = “NON LEAP YEAR”
                  End If
    Note: – ‘Dim’ is a variable. When we are through something then we write ‘Dim’. Here we get variable ‘A’.
    ‘Val’ = Volume of Text1 box.
    ‘Mod’ = Remainder value. Example: – 35/2 = 17 and remainder value is 1.
    ‘Else’ = Other than.
    ‘End If’ = End of the If condition.
    • Then double-click on ‘Clear box’ or ‘Command 2 box’
    • Then input code to Command 2 code box.
    Code: – Text1.Text = “”
                  Text2.Text = “”
    Note: – “” = clear the Text box.
    • Then close code box


    Step 5: –
    Project Save: –
    • Click on ‘Save project’ option from the File menu
    • Then input any name to file name box and click on Save option from Save file as box
    • Then input any new name to file name box
    • Then click ‘Save’ option.
    Step 6: –
             Project Run: –
    • Press F5 key from the keyboard or click on ‘Start’ from ‘Run menu’ for running the project
    • Then input any Year to ‘Text 1 box’
    • Then click on ‘Calculate’ button.


    • Then click on ‘Clear button’ for clear the TextBox.



    COMMENTS

    Name

    Computer,9,MS Office,2,Visual Basic,8,
    ltr
    item
    Computercoursestudy: Program for Leap Year in Visual Basic (Project 3)
    Program for Leap Year in Visual Basic (Project 3)
    https://2.bp.blogspot.com/-fu5hRANZUYU/WqD6YLdhbHI/AAAAAAAAAG4/HCl6L1SAViwsXrI87Sy_KpN1O72Hy-NRQCLcBGAs/s320/Program%2Bfor%2BLeap%2BYear%2Bin%2BVisual%2BBasic.png
    https://2.bp.blogspot.com/-fu5hRANZUYU/WqD6YLdhbHI/AAAAAAAAAG4/HCl6L1SAViwsXrI87Sy_KpN1O72Hy-NRQCLcBGAs/s72-c/Program%2Bfor%2BLeap%2BYear%2Bin%2BVisual%2BBasic.png
    Computercoursestudy
    https://www.computercoursestudy.com/2016/09/program-for-leap-year-in-visual-basic.html
    https://www.computercoursestudy.com/
    https://www.computercoursestudy.com/
    https://www.computercoursestudy.com/2016/09/program-for-leap-year-in-visual-basic.html
    true
    3961810787506653407
    UTF-8
    Loaded All Posts Not found any posts VIEW ALL Readmore Reply Cancel reply Delete By Home PAGES POSTS View All RECOMMENDED FOR YOU LABEL ARCHIVE SEARCH ALL POSTS Not found any post match with your request Back Home Sunday Monday Tuesday Wednesday Thursday Friday Saturday Sun Mon Tue Wed Thu Fri Sat January February March April May June July August September October November December Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec just now 1 minute ago $$1$$ minutes ago 1 hour ago $$1$$ hours ago Yesterday $$1$$ days ago $$1$$ weeks ago more than 5 weeks ago Followers Follow THIS CONTENT IS PREMIUM Please share to unlock Copy All Code Select All Code All codes were copied to your clipboard Can not copy the codes / texts, please press [CTRL]+[C] (or CMD+C with Mac) to copy