SlideShare una empresa de Scribd logo
1 de 37
aslkjdhfalskhjfgalsdkfhalskdhjfglaskdhjflaskdhjfglaksjdhflakshflaksdhjfglaksjhflaksjhf aslkjdhfalskhjfgalsdkfhalskdhjfglaskdhjflaskdhjfglaksjdhflakshflaksdhjfglaksjhflaksjhf aslkjdhfalskhjfgalsdkfhalskdhjfglaskdhjflaskdhjfglaksjdhflakshflaksdhjfglaksjhflaksjhf aslkjdhfalskhjfgalsdkfhalskdhjfglaskdhjflaskdhjfglaksjdhflakshflaksdhjfglaksjhflaksjhf aslkjdhfalskhjfgalsdkfhalskdhjfglaskdhjflaskdhjfglaksjdhflakshflaksdhjfglaksjhflaksjhf aslkjdhfalskhjfgalsdkfhalskdhjfglaskdhjflaskdhjfglaksjdhflakshflaksdhjfglaksjhflaksjhf aslkjdhfalskhjfgalsdkfhalskdhjfglaskdhjflaskdhjfglaksjdhflakshflaksdhjfglaksjhflaksjhf aslkjdhfalskhjfgalsdkfhalskdhjfglaskdhjflaskdhjfglaksjdhflakshflaksdhjfglaksjhflaksjhf aslkjdhfalskhjfgalsdkfhalskdhjfglaskdhjflaskdhjfglaksjdhflakshflaksdhjfglaksjhflaksjhf aslkjdhfalskhjfgalsdkfhalskdhjfglaskdhjflaskdhjfglaksjdhflakshflaksdhjfglaksjhflaksjhf aslkjdhfalskhjfgalsdkfhalskdhjfglaskdhjflaskdhjfglaksjdhflakshflaksdhjfglaksjhflaksjhf aslkjdhfalskhjfgalsdkfhalskdhjfglaskdhjflaskdhjfglaksjdhflakshflaksdhjfglaksjhflaksjhf aslkjdhfalskhjfgalsdkfhalskdhjfglaskdhjflaskdhjfglaksjdhflakshflaksdhjfglaksjhflaksjhf aslkjdhfalskhjfgalsdkfhalskdhjfglaskdhjflaskdhjfglaksjdhflakshflaksdhjfglaksjhflaksjhf aslkjdhfalskhjfgalsdkfhalskdhjfglaskdhjflaskdhjfglaksjdhflakshflaksdhjfglaksjhflaksjhf aslkjdhfalskhjfgalsdkfhalskdhjfglaskdhjflaskdhjfglaksjdhflakshflaksdhjfglaksjhflaksjhf aslkjdhfalskhjfgalsdkfhalskdhjfglaskdhjflaskdhjfglaksjdhflakshflaksdhjfglaksjhflaksjhf aslkjdhfalskhjfgalsdkfhalskdhjfglaskdhjflaskdhjfglaksjdhflakshflaksdhjfglaksjhflaksjhf aslkjdhfalskhjfgalsdkfhalskdhjfglaskdhjflaskdhjfglaksjdhflakshflaksdhjfglaksjhflaksjhf aslkjdhfalskhjfgalsdkfhalskdhjfglaskdhjflaskdhjfglaksjdhflakshflaksdhjfglaksjhflaksjhf aslkjdhfalskhjfgalsdkfhalskdhjfglaskdhjflaskdhjfglaksjdhflakshflaksdhjfglaksjhflaksjhf aslkjdhfalskhjfgalsdkfhalskdhjfglaskdhjflaskdhjfglaksjdhflakshflaksdhjfglaksjhflaksjhf aslkjdhfalskhjfgalsdkfhalskdhjfglaskdhjflaskdhjfglaksjdhflakshflaksdhjfglaksjhflaksjhf aslkjdhfalskhjfgalsdkfhalskdhjfglaskdhjflaskdhjfglaksjdhflakshflaksdhjfglaksjhflaksjhf
Additional Topics in Visual Basic Chapter 14 McGraw-Hill © 2006 The McGraw-Hill Companies, Inc. All rights reserved.
Objectives ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Advanced Validation Techniques ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
The ErrorProvider Component ,[object Object],[object Object],[object Object],[object Object]
ErrorProvider.SetError Method ,[object Object],[object Object],ErrorProviderObject.SetError(ControlName, MessageString) ErrorProvider1.SetError(Me.quantityTextBox, "Quantity must be numeric. " ) ErrorProvider1.SetError(Me.creditCardTextBox,  " Required field. " )
The MaxLength and CharacterCasing Properties ,[object Object],[object Object],[object Object],[object Object],[object Object],2 characters
Field-Level Validation ,[object Object],[object Object],[object Object],[object Object],[object Object]
Using the Validating Event and CausesValidation Property ,[object Object],[object Object],[object Object],[object Object],[object Object]
Capturing Keystrokes from the User ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Using the Masked Text Box for Validation ,[object Object],[object Object],[object Object],[object Object],[object Object]
Code Snippets ,[object Object],[object Object],[object Object],[object Object]
Sample Projects ,[object Object],[object Object],[object Object],[object Object]
Multiple Document Interface  (1 of 2) ,[object Object],[object Object],[object Object],[object Object],[object Object]
Multiple-Document Interface  (2 of 2) ,[object Object],[object Object],[object Object],[object Object]
MDI Application Forms The main form is the parent and the smaller forms are the child forms
Creating an MDI Project  (1 of 2) ,[object Object],[object Object],[object Object],[object Object]
Creating an MDI Project  ( 2 of 2) ,[object Object],[object Object],[object Object]
Child Form Code Example Private Sub displayChildOneMenuItem_Click(ByVal sender As _ System.Object, ByVal e As System.EventArgs) Handles _ displayChildOneMenuItem.Click ' Display Child One form. Dim childOneForm As New childOneForm( ) childOneForm.MdiParent = Me childOneForm.Show( ) End Sub
MDI Child Title Bar Example ' Module-level declarations. Dim childOneCountInteger As Integer Private Sub displayChildOneMenuItem_Click(ByVal sender As _ System.Object, ByVal e As System.EventArgs) Handles _ displayChildOneMenuItem.Click ' Display Child One form.  Dim childOneForm As New childOneForm childOneForm.MdiParent = Me childOneCountInteger += 1 childOneForm.Text = "ChildOne Document " _   & childOneCountInteger.ToString( ) childOneForm.Show( ) End Sub
Adding a Window Menu ,[object Object],[object Object],[object Object],[object Object]
MenuStrip Control  (1 of 2) ,[object Object],[object Object],[object Object],[object Object],[object Object]
MenuStrip Control   (2 of 2) Set the  MdiWindowListItem property  to make the Window menu display the list of open MDI child windows
Layout Options ,[object Object],[object Object],Me. LayoutMdi ( MdiLayout .TileHorizontal) Me. LayoutMdi ( MdiLayout .TileVertical) Me .LayoutMdi ( MdiLayout .Cascade)
Toolbars and Status Bars ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Toolbars ,[object Object],[object Object],[object Object]
Items Collection Editor Drop down list of available objects such as buttons
Status Bars ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Assigning Values to ToolStripStatusLabels ,[object Object],[object Object],Me.dateToolStripStatusLabel.Text = Now.ToShortDateString( ) Me.timeToolStripStatusLabel.Text = Now.ToLongTimeString( ) Me.informationToolStripStatusLabel.Text = "It’s very late."
Displaying the Date and Time ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Some Helpful Date Controls ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
DateTimePicker Control ,[object Object],[object Object],[object Object],[object Object]
Calendar Controls
Using Calendars Example Me.birthdateDateTimePicker.Value = Convert.ToDateTime(Me.birthdateTextBox.Text)
Displaying Web Pages on a Windows Form ,[object Object],[object Object],[object Object]
The WebBrowser Control ,[object Object]
A WebBrowser Program

Más contenido relacionado

La actualidad más candente

Mfc programming tutorial automation step by-step
Mfc programming tutorial automation step by-stepMfc programming tutorial automation step by-step
Mfc programming tutorial automation step by-step
namtranvanpt
 
visual basic v6 introduction
visual basic v6 introductionvisual basic v6 introduction
visual basic v6 introduction
bloodyedge03
 
Working with visual basic applications
Working with visual basic applicationsWorking with visual basic applications
Working with visual basic applications
Sara Corpuz
 
Visual basic
Visual basicVisual basic
Visual basic
Dharmik
 
Vb6.0 Introduction
Vb6.0 IntroductionVb6.0 Introduction
Vb6.0 Introduction
Tennyson
 
Visual basic ppt for tutorials computer
Visual basic ppt for tutorials computerVisual basic ppt for tutorials computer
Visual basic ppt for tutorials computer
simran153
 
VB.Net GUI Unit_01
VB.Net GUI Unit_01VB.Net GUI Unit_01
VB.Net GUI Unit_01
Prashanth Shivakumar
 
Visual basic 6.0
Visual basic 6.0Visual basic 6.0
Visual basic 6.0
sanket1996
 

La actualidad más candente (20)

Windows programming ppt
Windows programming pptWindows programming ppt
Windows programming ppt
 
Visual basic
Visual basicVisual basic
Visual basic
 
Common dialog control
Common dialog controlCommon dialog control
Common dialog control
 
Meaning Of VB
Meaning Of VBMeaning Of VB
Meaning Of VB
 
Working with Multiple Application - R.D.Sivakumar
Working with Multiple Application - R.D.SivakumarWorking with Multiple Application - R.D.Sivakumar
Working with Multiple Application - R.D.Sivakumar
 
Mfc programming tutorial automation step by-step
Mfc programming tutorial automation step by-stepMfc programming tutorial automation step by-step
Mfc programming tutorial automation step by-step
 
visual basic v6 introduction
visual basic v6 introductionvisual basic v6 introduction
visual basic v6 introduction
 
Working with visual basic applications
Working with visual basic applicationsWorking with visual basic applications
Working with visual basic applications
 
Vb basics
Vb basicsVb basics
Vb basics
 
Vb tutorial
Vb tutorialVb tutorial
Vb tutorial
 
Visual basic
Visual basicVisual basic
Visual basic
 
Visual Basic IDE Introduction
Visual Basic IDE IntroductionVisual Basic IDE Introduction
Visual Basic IDE Introduction
 
visual basic programming
visual basic programmingvisual basic programming
visual basic programming
 
Vb6.0 Introduction
Vb6.0 IntroductionVb6.0 Introduction
Vb6.0 Introduction
 
Class viii ch-7 visual basic 2008
Class  viii ch-7 visual basic 2008Class  viii ch-7 visual basic 2008
Class viii ch-7 visual basic 2008
 
Visual basic ppt for tutorials computer
Visual basic ppt for tutorials computerVisual basic ppt for tutorials computer
Visual basic ppt for tutorials computer
 
Visual Basic Controls ppt
Visual Basic Controls pptVisual Basic Controls ppt
Visual Basic Controls ppt
 
VB.Net GUI Unit_01
VB.Net GUI Unit_01VB.Net GUI Unit_01
VB.Net GUI Unit_01
 
Visual basic 6.0
Visual basic 6.0Visual basic 6.0
Visual basic 6.0
 
Visual programming lecture
Visual programming lecture Visual programming lecture
Visual programming lecture
 

Similar a Chapter 14

AlarmClockAlarmClockAlarmClock.Designer.vbGlobal.Microsoft..docx
AlarmClockAlarmClockAlarmClock.Designer.vbGlobal.Microsoft..docxAlarmClockAlarmClockAlarmClock.Designer.vbGlobal.Microsoft..docx
AlarmClockAlarmClockAlarmClock.Designer.vbGlobal.Microsoft..docx
galerussel59292
 
Visual basic 6.0
Visual basic 6.0Visual basic 6.0
Visual basic 6.0
Aarti P
 
Practicalfileofvb workshop
Practicalfileofvb workshopPracticalfileofvb workshop
Practicalfileofvb workshop
dhi her
 
Booa8 Slide 11
Booa8 Slide 11Booa8 Slide 11
Booa8 Slide 11
oswchavez
 
Java script frame window
Java script frame windowJava script frame window
Java script frame window
H K
 
Ajax control tool kit
Ajax control tool kitAjax control tool kit
Ajax control tool kit
Vidhi Patel
 

Similar a Chapter 14 (20)

Chapter 01
Chapter 01Chapter 01
Chapter 01
 
AlarmClockAlarmClockAlarmClock.Designer.vbGlobal.Microsoft..docx
AlarmClockAlarmClockAlarmClock.Designer.vbGlobal.Microsoft..docxAlarmClockAlarmClockAlarmClock.Designer.vbGlobal.Microsoft..docx
AlarmClockAlarmClockAlarmClock.Designer.vbGlobal.Microsoft..docx
 
06 win forms
06 win forms06 win forms
06 win forms
 
Vb6.0 intro
Vb6.0 introVb6.0 intro
Vb6.0 intro
 
flutteragency-com-handling-events-and-user-input-in-flutter-.pdf
flutteragency-com-handling-events-and-user-input-in-flutter-.pdfflutteragency-com-handling-events-and-user-input-in-flutter-.pdf
flutteragency-com-handling-events-and-user-input-in-flutter-.pdf
 
Java script
Java scriptJava script
Java script
 
VB.Net-Controls and events
VB.Net-Controls and eventsVB.Net-Controls and events
VB.Net-Controls and events
 
Vb introduction.
Vb introduction.Vb introduction.
Vb introduction.
 
Visual basic 6.0
Visual basic 6.0Visual basic 6.0
Visual basic 6.0
 
Controls events
Controls eventsControls events
Controls events
 
Practicalfileofvb workshop
Practicalfileofvb workshopPracticalfileofvb workshop
Practicalfileofvb workshop
 
Final report mobile shop
Final report   mobile shopFinal report   mobile shop
Final report mobile shop
 
engineeringdsgtnotesofunitfivesnists.ppt
engineeringdsgtnotesofunitfivesnists.pptengineeringdsgtnotesofunitfivesnists.ppt
engineeringdsgtnotesofunitfivesnists.ppt
 
Microsoft MVP ComCamp 2014 발표자료 / 윈도우 8.1 앱개발 새로운 API들 / 이길복, 주신영 MVP
Microsoft MVP ComCamp 2014 발표자료 / 윈도우 8.1 앱개발 새로운 API들 / 이길복, 주신영 MVPMicrosoft MVP ComCamp 2014 발표자료 / 윈도우 8.1 앱개발 새로운 API들 / 이길복, 주신영 MVP
Microsoft MVP ComCamp 2014 발표자료 / 윈도우 8.1 앱개발 새로운 API들 / 이길복, 주신영 MVP
 
Csharp
CsharpCsharp
Csharp
 
Booa8 Slide 11
Booa8 Slide 11Booa8 Slide 11
Booa8 Slide 11
 
Java script frame window
Java script frame windowJava script frame window
Java script frame window
 
20150812 4시간만에 따라해보는 windows 10 앱 개발
20150812  4시간만에 따라해보는 windows 10 앱 개발20150812  4시간만에 따라해보는 windows 10 앱 개발
20150812 4시간만에 따라해보는 windows 10 앱 개발
 
Chapter 02
Chapter 02Chapter 02
Chapter 02
 
Ajax control tool kit
Ajax control tool kitAjax control tool kit
Ajax control tool kit
 

Más de Terry Yoast

Más de Terry Yoast (20)

9781305078444 ppt ch12
9781305078444 ppt ch129781305078444 ppt ch12
9781305078444 ppt ch12
 
9781305078444 ppt ch11
9781305078444 ppt ch119781305078444 ppt ch11
9781305078444 ppt ch11
 
9781305078444 ppt ch10
9781305078444 ppt ch109781305078444 ppt ch10
9781305078444 ppt ch10
 
9781305078444 ppt ch09
9781305078444 ppt ch099781305078444 ppt ch09
9781305078444 ppt ch09
 
9781305078444 ppt ch08
9781305078444 ppt ch089781305078444 ppt ch08
9781305078444 ppt ch08
 
9781305078444 ppt ch07
9781305078444 ppt ch079781305078444 ppt ch07
9781305078444 ppt ch07
 
9781305078444 ppt ch06
9781305078444 ppt ch069781305078444 ppt ch06
9781305078444 ppt ch06
 
9781305078444 ppt ch05
9781305078444 ppt ch059781305078444 ppt ch05
9781305078444 ppt ch05
 
9781305078444 ppt ch04
9781305078444 ppt ch049781305078444 ppt ch04
9781305078444 ppt ch04
 
9781305078444 ppt ch03
9781305078444 ppt ch039781305078444 ppt ch03
9781305078444 ppt ch03
 
9781305078444 ppt ch02
9781305078444 ppt ch029781305078444 ppt ch02
9781305078444 ppt ch02
 
9781305078444 ppt ch01
9781305078444 ppt ch019781305078444 ppt ch01
9781305078444 ppt ch01
 
9781337102087 ppt ch13
9781337102087 ppt ch139781337102087 ppt ch13
9781337102087 ppt ch13
 
9781337102087 ppt ch18
9781337102087 ppt ch189781337102087 ppt ch18
9781337102087 ppt ch18
 
9781337102087 ppt ch17
9781337102087 ppt ch179781337102087 ppt ch17
9781337102087 ppt ch17
 
9781337102087 ppt ch16
9781337102087 ppt ch169781337102087 ppt ch16
9781337102087 ppt ch16
 
9781337102087 ppt ch15
9781337102087 ppt ch159781337102087 ppt ch15
9781337102087 ppt ch15
 
9781337102087 ppt ch14
9781337102087 ppt ch149781337102087 ppt ch14
9781337102087 ppt ch14
 
9781337102087 ppt ch12
9781337102087 ppt ch129781337102087 ppt ch12
9781337102087 ppt ch12
 
9781337102087 ppt ch11
9781337102087 ppt ch119781337102087 ppt ch11
9781337102087 ppt ch11
 

Último

Salient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functionsSalient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functions
KarakKing
 
The basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxThe basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptx
heathfieldcps1
 
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
ZurliaSoop
 

Último (20)

SOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning PresentationSOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning Presentation
 
Holdier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfHoldier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdf
 
Salient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functionsSalient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functions
 
How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17
 
How to setup Pycharm environment for Odoo 17.pptx
How to setup Pycharm environment for Odoo 17.pptxHow to setup Pycharm environment for Odoo 17.pptx
How to setup Pycharm environment for Odoo 17.pptx
 
Jamworks pilot and AI at Jisc (20/03/2024)
Jamworks pilot and AI at Jisc (20/03/2024)Jamworks pilot and AI at Jisc (20/03/2024)
Jamworks pilot and AI at Jisc (20/03/2024)
 
The basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxThe basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptx
 
FSB Advising Checklist - Orientation 2024
FSB Advising Checklist - Orientation 2024FSB Advising Checklist - Orientation 2024
FSB Advising Checklist - Orientation 2024
 
How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17
 
Google Gemini An AI Revolution in Education.pptx
Google Gemini An AI Revolution in Education.pptxGoogle Gemini An AI Revolution in Education.pptx
Google Gemini An AI Revolution in Education.pptx
 
Interdisciplinary_Insights_Data_Collection_Methods.pptx
Interdisciplinary_Insights_Data_Collection_Methods.pptxInterdisciplinary_Insights_Data_Collection_Methods.pptx
Interdisciplinary_Insights_Data_Collection_Methods.pptx
 
Graduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - EnglishGraduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - English
 
Key note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfKey note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdf
 
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
 
Single or Multiple melodic lines structure
Single or Multiple melodic lines structureSingle or Multiple melodic lines structure
Single or Multiple melodic lines structure
 
General Principles of Intellectual Property: Concepts of Intellectual Proper...
General Principles of Intellectual Property: Concepts of Intellectual  Proper...General Principles of Intellectual Property: Concepts of Intellectual  Proper...
General Principles of Intellectual Property: Concepts of Intellectual Proper...
 
Fostering Friendships - Enhancing Social Bonds in the Classroom
Fostering Friendships - Enhancing Social Bonds  in the ClassroomFostering Friendships - Enhancing Social Bonds  in the Classroom
Fostering Friendships - Enhancing Social Bonds in the Classroom
 
On_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptx
On_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptxOn_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptx
On_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptx
 
ICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptxICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptx
 
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
 

Chapter 14

  • 1. aslkjdhfalskhjfgalsdkfhalskdhjfglaskdhjflaskdhjfglaksjdhflakshflaksdhjfglaksjhflaksjhf aslkjdhfalskhjfgalsdkfhalskdhjfglaskdhjflaskdhjfglaksjdhflakshflaksdhjfglaksjhflaksjhf aslkjdhfalskhjfgalsdkfhalskdhjfglaskdhjflaskdhjfglaksjdhflakshflaksdhjfglaksjhflaksjhf aslkjdhfalskhjfgalsdkfhalskdhjfglaskdhjflaskdhjfglaksjdhflakshflaksdhjfglaksjhflaksjhf aslkjdhfalskhjfgalsdkfhalskdhjfglaskdhjflaskdhjfglaksjdhflakshflaksdhjfglaksjhflaksjhf aslkjdhfalskhjfgalsdkfhalskdhjfglaskdhjflaskdhjfglaksjdhflakshflaksdhjfglaksjhflaksjhf aslkjdhfalskhjfgalsdkfhalskdhjfglaskdhjflaskdhjfglaksjdhflakshflaksdhjfglaksjhflaksjhf aslkjdhfalskhjfgalsdkfhalskdhjfglaskdhjflaskdhjfglaksjdhflakshflaksdhjfglaksjhflaksjhf aslkjdhfalskhjfgalsdkfhalskdhjfglaskdhjflaskdhjfglaksjdhflakshflaksdhjfglaksjhflaksjhf aslkjdhfalskhjfgalsdkfhalskdhjfglaskdhjflaskdhjfglaksjdhflakshflaksdhjfglaksjhflaksjhf aslkjdhfalskhjfgalsdkfhalskdhjfglaskdhjflaskdhjfglaksjdhflakshflaksdhjfglaksjhflaksjhf aslkjdhfalskhjfgalsdkfhalskdhjfglaskdhjflaskdhjfglaksjdhflakshflaksdhjfglaksjhflaksjhf aslkjdhfalskhjfgalsdkfhalskdhjfglaskdhjflaskdhjfglaksjdhflakshflaksdhjfglaksjhflaksjhf aslkjdhfalskhjfgalsdkfhalskdhjfglaskdhjflaskdhjfglaksjdhflakshflaksdhjfglaksjhflaksjhf aslkjdhfalskhjfgalsdkfhalskdhjfglaskdhjflaskdhjfglaksjdhflakshflaksdhjfglaksjhflaksjhf aslkjdhfalskhjfgalsdkfhalskdhjfglaskdhjflaskdhjfglaksjdhflakshflaksdhjfglaksjhflaksjhf aslkjdhfalskhjfgalsdkfhalskdhjfglaskdhjflaskdhjfglaksjdhflakshflaksdhjfglaksjhflaksjhf aslkjdhfalskhjfgalsdkfhalskdhjfglaskdhjflaskdhjfglaksjdhflakshflaksdhjfglaksjhflaksjhf aslkjdhfalskhjfgalsdkfhalskdhjfglaskdhjflaskdhjfglaksjdhflakshflaksdhjfglaksjhflaksjhf aslkjdhfalskhjfgalsdkfhalskdhjfglaskdhjflaskdhjfglaksjdhflakshflaksdhjfglaksjhflaksjhf aslkjdhfalskhjfgalsdkfhalskdhjfglaskdhjflaskdhjfglaksjdhflakshflaksdhjfglaksjhflaksjhf aslkjdhfalskhjfgalsdkfhalskdhjfglaskdhjflaskdhjfglaksjdhflakshflaksdhjfglaksjhflaksjhf aslkjdhfalskhjfgalsdkfhalskdhjfglaskdhjflaskdhjfglaksjdhflakshflaksdhjfglaksjhflaksjhf aslkjdhfalskhjfgalsdkfhalskdhjfglaskdhjflaskdhjfglaksjdhflakshflaksdhjfglaksjhflaksjhf
  • 2. Additional Topics in Visual Basic Chapter 14 McGraw-Hill © 2006 The McGraw-Hill Companies, Inc. All rights reserved.
  • 3.
  • 4.
  • 5.
  • 6.
  • 7.
  • 8.
  • 9.
  • 10.
  • 11.
  • 12.
  • 13.
  • 14.
  • 15.
  • 16. MDI Application Forms The main form is the parent and the smaller forms are the child forms
  • 17.
  • 18.
  • 19. Child Form Code Example Private Sub displayChildOneMenuItem_Click(ByVal sender As _ System.Object, ByVal e As System.EventArgs) Handles _ displayChildOneMenuItem.Click ' Display Child One form. Dim childOneForm As New childOneForm( ) childOneForm.MdiParent = Me childOneForm.Show( ) End Sub
  • 20. MDI Child Title Bar Example ' Module-level declarations. Dim childOneCountInteger As Integer Private Sub displayChildOneMenuItem_Click(ByVal sender As _ System.Object, ByVal e As System.EventArgs) Handles _ displayChildOneMenuItem.Click ' Display Child One form. Dim childOneForm As New childOneForm childOneForm.MdiParent = Me childOneCountInteger += 1 childOneForm.Text = "ChildOne Document " _ & childOneCountInteger.ToString( ) childOneForm.Show( ) End Sub
  • 21.
  • 22.
  • 23. MenuStrip Control (2 of 2) Set the MdiWindowListItem property to make the Window menu display the list of open MDI child windows
  • 24.
  • 25.
  • 26.
  • 27. Items Collection Editor Drop down list of available objects such as buttons
  • 28.
  • 29.
  • 30.
  • 31.
  • 32.
  • 34. Using Calendars Example Me.birthdateDateTimePicker.Value = Convert.ToDateTime(Me.birthdateTextBox.Text)
  • 35.
  • 36.

Notas del editor

  1. Brief description on how to navigate within this presentation (ppt) The first time a Key Term from the chapter is used in the ppt it will display in blue Gold colored text boxes display coding examples Slides will be numbered (# of #) when multiple slides on same topic (Slide title) Speaker notes are included where appropriate for slides (*)Denotes either a comment for page reference to textbook or slide reference in ppt
  2. *The next slide displays the SetError Method (key term) General Form and example
  3. If a form has many input fields, the validation code can be quite long and complex Users can become confused or annoyed if multiple message boxes appear one after another
  4. In the Validating event procedure error checking can be performed and a message displayed for the user If the validating event is used on the field that receives focus when the form is first displayed and rquires an entry, the user will be unable to close the form without filling in the text box—the e.Canel = False
  5. If the user enters invalid data for the mask, such as a letter for a numeric month in the date mask, the character is not accepted
  6. The structure for loops, exception handling, and arrays are found under the Visual Basic Language option
  7. 4
  8. VB allows users to have forms that act independently from each other as well as having forms that may have a parent form and several child forms A feature of MDI is that several documents can be open at the same time-the menu strip generally contains a Window menu that allows a list of open windows to display and move from active document to another
  9. 5 Any form can be a parent-a form can be both a parent and a child form
  10. *The next slide shows an example of a Child form
  11. With multiple child windows, the title bar of each child window should be unique—this can be accomplished by appending a number to the title bar before displaying the form
  12. Take a look at the Window menu in an application such as Word or Excel-a list of the open documents as well as options for arranging the windows displays
  13. *The next slide displays the code to layout several child windows that are open
  14. Adding features such as toolbars and/or status bars can enhance the usability of a program Toolbars are typically used in applications as an easy shortcut for menu items Status bars normally appear at the bottom of the screen to display information for the user *The next slide displays the ToolStrip’s Items Collection Editor
  15. Select an items property in the Properties window to open the ItemsCollection Editor
  16. *The next slide displays code examples for assign value to ToolStripStatusLabels
  17. *The next slide provides additional details for the DateTimePicker control Value property
  18. The DateTime Picker drops down a calendar when selected and shows the selected day and date when not dropped down; the MonthCalendar control displays the calendar
  19. User enters a birthdate in a text box-it converts the text box entry in a Try/Catch in order to trap for illegal date formats
  20. Be sure to have a live internet connection to display Web pages in the WebBrowser control
  21. Notice the use of “Uri” in the above table. A Uniform Resource Identifier (URI) is a Web address that is more generic than “URL”. The latest version of the WebBrowser control requires that all URL’s be instances of the Uri class.
  22. This slide displays a Web page in a WebBrowser control-the form has a ToolStrip control with a ToolStripComboBox and a ToolStripButton to aid navigation When the user enters a new URL in the text portion of the combo box, he or she can either press Enter or click the Go button on the toolbar The ToolStripComboBox_KeyUp event procedure checks for the Enter key, and the ToolStripButton_Click event procedure checks for a click on the button