L7_FormControls

L7_FormControls - WindowsFormandControls Windows Form and...

Info iconThis preview shows pages 1–8. Sign up to view the full content.

View Full Document Right Arrow Icon
indows Form and Controls Windows Form and Controls BIT 3444 G. Alan Wang 09.30.2008 1
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
utline Outline Windows Forms do s os Windows Controls TextBox ListBox CheckBox RadioButton CheckedListBox ComboBox MenuStrip olStrip ToolStrip
Background image of page 2
indows Forms Windows Forms Windows form is the container object for all A Windows form is the container object for all the controls that make up the user interface r a Windows application for a Windows application 3
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Form properties Property Description Name Sets or gets the name of the form. Text Sets or gets the text displayed in the form title bar. AcceptButton Identifies the button that will be activated when the user presses the Enter key. ancelButton entifies e button that will be activated when the CancelButton Identifies the button that will be activated when the user presses the Esc key. StartPosition Sets the position at which the form is displayed. To center the form, set this property to CenterScreen. AutoScroll Indicates whether scroll bars will automatically appear if the form becomes too small to display all its controls. ontrolBox nables or sables the Windows Control menu ControlBox Enables or disables the Windows Control menu. Murach’s Visual Basic 2005, C2 © 2006, Mike Murach & Associates, Inc. Slide 4
Background image of page 4
rm Events Form Events The Activated and Deactivate Events Each time a form is activated, the Activated event takes place When a form is activated, the previously active form fires the eactivate event Deactivate event The FormClosing event is fired before the form is actually closed You can cancel the closing of a form by setting the e.Cancel property to True It’s useful in cases such as prompting users to save unsaved data The FormClosed event is fired after the form is closed It’s too late to cancel the form closing 5
Background image of page 5

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
rm Demo Form Demo
Background image of page 6
Common properties for Windows controls Property Description Name Sets or gets the name of the control. ext ets o gets the text displayed on the control Text Sets or gets the text displayed on the control. Enabled Determines whether the control will be enabled or disabled. eadOnly etermines whether the text in some controls like ReadOnly Determines whether the text in some controls like text boxes can be edited. TabIndex Indicates the control’s position in the tab order, hich determines the order in which the controls which determines the order in which the controls will receive the focus when the user presses the Tab key. TabStop Determines whether the control will accept the p p focus when the user presses the Tab key to move from one control to another. Some controls, like labels, don’t have the TabStop property.
Background image of page 7

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 8
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 35

L7_FormControls - WindowsFormandControls Windows Form and...

This preview shows document pages 1 - 8. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online