วันพุธที่ 31 กรกฎาคม พ.ศ. 2556

Visual Basic 6.0 : Exercise 2 " Pizza Order"


Visual Basic 6.0 : Exercise 2 " Pizza Order"


          Exercise 2
                                 Pizza Order Application 

    We had just learned about programming with Microsoft Visual Basic 6.0 and tried to create two Windows applications (using Visual Basic 6.0)


  "Pizza Order" Application
1.Start a new project.  We'll build a form where a pizza order can be entered by simply clicking on check boxes and option buttons.
2.Draw three frames.  In the first, draw three option buttons, in the second, draw two option buttons, and in the third, draw six check boxes.  Draw two option buttons on the form.  Add two command buttons.  Make things look something like this.

3.Set the properties of the form and each control.

  • Form1:
    BorderStyle    1-Fixed Single
    Caption          Pizza Order
    Name            frmPizza
  • Frame1:
    Caption    Size
  • Frame2:
    Caption    Crust Type
  • Frame3
    Caption    Toppings
  • Option1:
    Caption    Small
    Name      optSize
    Value      True
  • Option2:
    Caption    Medium
    Name      optSize (yes, create a control array)
  • Option3:
    Caption    Large
    Name      optSize
  • Option4:
    Caption    Thin Crust
    Name       optCrust
    Value       True
  • Option5:
    Caption    Thick Crust
    Name       optCrust (yes, create a control array)
  • Option6:
    Caption    Eat In
    Name    optWhere
    Value    True
  • Option7:
    Caption    Take Out
    Name       optWhere (yes, create a control array)
  • Check1:
    Caption    Extra Cheese
    Name      chkTop
  • Check2:
    Caption    Mushrooms
    Name       chkTop (yes, create a control array)
  • Check3:
    Caption    Black Olives
    Name       chkTop
  • Check4:
    Caption    Onions
    Name      chkTop
  • Check5:
    Caption    Green Peppers
    Name      chkTop
  • Check6:
    Caption    Tomatoes
    Name      chkTop
  • Command1:
    Caption    &Build Pizza
    Name      cmdBuild
  • Command2:
    Caption    E&xit
    Name      cmdExit

ไม่มีความคิดเห็น:

แสดงความคิดเห็น