Subscribe to [FP-1] Sandich Builder with VB2010        RSS Feed
-----

[Pt. 1] Main Form Layout 1

Icon Leave Comment
No coding for the first few parts. This will mostly be Laying out our Forms before giving them any functionality.

Start off with the Main Form.

Create a new project and one Form will already be ready for use.

Make the following changes to the Form

Form
Backcolor: Firebrick
Text: Sandwich Builder
Name: frmBuilder
MaxumimSize: 976, 709
MinimumSize: 976, 709
Size: 976, 709
StartPosition: CenterScreen
MaximumBox: False
MinimumBox: False







Now lets make a Title and Sub-Title. Do this by adding 2 Labels

Label (Title)
Font: Castellar, 24pt, Bold
Forecolor: Yellow
Text: Blitz Sandwich
Name: lblTitle
Location: 311, 14

Label (Sub)
Font: Castellar, 18pt, Bold
Forecolor: Yellow
Text: Blitz Sandwich
Name: lblTitle
Location: 329, 49



Now add an area for users to choose a bread. We are going to give them the option to:
-Choose the type they want
-Allow them to have it toasted
-The choice of how they want it toasted



We will start off by adding a Panel

Panel
Name: pancheck
Location: 341,115
Size: 279,163


With that done, we are going to start to working on the section where the user is going to select the type of bread and how they want it toasted by adding 2 GroupBoxs inside the Panel.


Put groupbox inside the panel before changing the location!

GroupBox (Bread Type)
Font: Century Schoolbook, Regular, 8
Forecolor: Yellow
Text: Bread
Name: groupbread
Location: 3, 13
Size: 162, 49

GroupBox (Toast)
Font: Century Schoolbook, Regular, 8
Forecolor: SkyBlue
Text: Toasted
Visible: False
Name: grouptoasted
Location: 171, 59
Size: 73, 88



I know this looks a bit weird now, but we are not done yet. We are going to add 2 Buttons this will make the Toasted GroupBox visible and invisible


Button (Toast)
BackColor: MediumBlue
ForeColor: SkyBlue
Text: Toast
Enabled: False
Name: btnToast
Location: 171, 28
Size: 86,23


Button (Do Not Toast)
BackColor: MediumBlue
ForeColor: SkyBlue
Text: Do Not Toast
Visible: False
Name: btnDoNotToast
Location: 171, 28
Size: 86,23

Location and size are the same!

Now, lets fill them GroupBoxes With some RadioButtons and a ComboBox

ComboBox
DropDownStyle: DropDownList
Items:
  • Rye
  • White
  • Cinnamon Raisin
  • Pretzel
  • Cheese Bread
  • Sour Dough
  • Bagel
  • Cornbread
  • French
  • Cuban
  • Panini
  • Italian

Name: comboBread
Location: 20, 15 (Inside the Bread ComboBox)


Now we are going to add 4 RadioButtons. These are going to allow the user to select how they want their bread toasted.


RadioButton (Light)
Text: Light
Name: radioLight
Location: 7, 17 (Inside the Toasted GroupBox)

RadioButton (Medium)
Text: Medium
Name: radioMedium
Location: 7, 40 (Inside the Toasted GroupBox)

RadioButton (Dark)
Text: Dark
Name: radioDark
Location: 7, 63 (Inside the Toasted GroupBox)

RadioButton (None)
Text: (Leave Blank)
Name: radioNone
Location: 55, 57 (Inside the Toasted GroupBox)

If you're new to VB or GroupBoxes
Spoiler






Key Things

  • Toast Button is not shown
  • Toasted GrouBox is Invisible


In the next Part of the Layout, we are going to be adding GroupBoxes and a lot of CheckBoxes. These are going to allow the user to select the contents of their sandwich.

0 Comments On This Entry

 

Trackbacks for this entry [ Trackback URL ]

There are no Trackbacks for this entry

December 2017

S M T W T F S
     12
3456789
10111213 14 1516
17181920212223
24252627282930
31      

Tags

    Recent Entries

    Recent Comments

    Search My Blog

    0 user(s) viewing

    0 Guests
    0 member(s)
    0 anonymous member(s)