22

Check,combo,list,picture box

Embed Size (px)

DESCRIPTION

 

Citation preview

Page 1: Check,combo,list,picture box
Page 2: Check,combo,list,picture box

IN VISUAL STUDIO 2010

TOOLBOX

Page 3: Check,combo,list,picture box

Listbox

ComboBox

Checkbox

Radio Button

PictureBox and GroupBox

Page 4: Check,combo,list,picture box

LISTBOX

Displays a list which the user can select items.

Default name: ListBox1

Page 5: Check,combo,list,picture box

SAMPLE FORM:

Page 6: Check,combo,list,picture box

CODES:

Add Button:ListBox1.Items.Add(TextBox1.Text)TextBox1.Text = "“

Remove:ListBox1.Items.Clear()

Exit:Me.Close()

Page 7: Check,combo,list,picture box

COMBOBOX

•Displays an editable textbox with a dropdown list of permitted values.

•Default name: ComboBox1

Page 8: Check,combo,list,picture box
Page 9: Check,combo,list,picture box
Page 10: Check,combo,list,picture box

CODES:If ComboBox1.SelectedItem =

"Jedrick Baylon" Then TextBox1.Text = "4th Year - Humility"

Else If ComboBox1.SelectedItem = "Aldrin Dela Cruz" Then TextBox1.Text = "4th Year - Chastity“

Else If ComboBox1.SelectedItem = "Christian Valino" Then TextBox1.Text = "4th Year - Love"

Else If ComboBox1.SelectedItem = "Angelica Manliclic" Then TextBox1.Text = "4th Year - Simplicity"

Page 11: Check,combo,list,picture box

CHECKBOX

•Enables the user to select or clear the associated option.

•Let the user select ZERO or MORE options of a limited number of choices.

•Default name: Checkbox1

Page 12: Check,combo,list,picture box

SAMPLE FORM:

Page 13: Check,combo,list,picture box

CODES:If CheckBox1.Checked = True Then MsgBox("P3,000.00", , "Price") End If If CheckBox2.Checked = True Then MsgBox("4,999.00", , "Price") End If If CheckBox3.Checked = True Then MsgBox("P8,600.00", , "Price") End If If CheckBox4.Checked = True Then MsgBox("P25,000.00", , "Price") End If If CheckBox5.Checked = True Then MsgBox("P15,888.00", , "Price") End If

Page 14: Check,combo,list,picture box

RADIO BUTTON• Enables the user to select a single option

from a group of choices when paired with other RadioButtons.

• Radio buttons are like checkboxes except that when several share the same control name, they are mutually exclusive: when one is switched "on", all others with the same name are switched "off".

• Default name: RadioButtons1

Page 15: Check,combo,list,picture box

PICTUREBOX AND GROUPBOX

PictureBox• Displays an image.• Default name: PictureBox

GroupBox• Displays a frame around a group of controls

with an optional caption.• Default name: GroupBox1

Page 16: Check,combo,list,picture box

SAMPLE FORM:

Page 17: Check,combo,list,picture box

PROPERTIES• Image – The image will display in the PictureBox•Size Mode – (Normal, StretchImage, AutoSize, CenterImage, Zoom) Controls how the PictureBox will handle image placementand control sizing.• Visible – Determine whether the control is visible or hiddent

Page 18: Check,combo,list,picture box
Page 19: Check,combo,list,picture box
Page 20: Check,combo,list,picture box
Page 21: Check,combo,list,picture box
Page 22: Check,combo,list,picture box

CODES:Public Class Form1

Private Sub RadioButton1_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles RadioButton1.CheckedChanged PictureBox1.Image = My.Resources.charm_bracelet label1.text = "P400.00" End Sub

Private Sub RadioButton2_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles RadioButton2.CheckedChanged PictureBox1.Image = My.Resources.crystal_bracelet Label1.Text = "P350.00" End Sub

Private Sub RadioButton3_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles RadioButton3.CheckedChanged PictureBox1.Image = My.Resources.owl_bracelet Label1.Text = "P500.00" End Sub

Private Sub RadioButton4_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles RadioButton4.CheckedChanged PictureBox1.Image = My.Resources.ruby_bracelet Label1.Text = "P450.00" End Sub