Open navigation menu
Close suggestions
Search
Search
en
Change Language
Upload
Sign in
Sign in
Download free for days
0 ratings
0% found this document useful (0 votes)
7 views
Introduction to Visual Basic.NET Programming In Visual Basic.NET. - 20250114_190449
.net
Uploaded by
Agripino Verdera Jr.
Copyright
© © All Rights Reserved
Available Formats
Download as PDF or read online on Scribd
Download now
Download
Save Introduction to Visual Basic.NET Programming In Vi... For Later
Download
Save
Save Introduction to Visual Basic.NET Programming In Vi... For Later
0%
0% found this document useful, undefined
0%
, undefined
Embed
Share
Print
Report
0 ratings
0% found this document useful (0 votes)
7 views
Introduction to Visual Basic.NET Programming In Visual Basic.NET. - 20250114_190449
.net
Uploaded by
Agripino Verdera Jr.
Copyright
© © All Rights Reserved
Available Formats
Download as PDF or read online on Scribd
Download now
Download
Save Introduction to Visual Basic.NET Programming In Vi... For Later
Carousel Previous
Carousel Next
Save
Save Introduction to Visual Basic.NET Programming In Vi... For Later
0%
0% found this document useful, undefined
0%
, undefined
Embed
Share
Print
Report
Download now
Download
You are on page 1
/ 32
Search
Fullscreen
Introduction to Visual Basic.NET Programming In Visual Basic.NETWriting Windows ay Applications with VB 2 * Windows Graphical User Interface * Window = Form ¢ Toolbox of elements called Controls — Text Box — Label — Check Box — ButtonObject Model * Object ==> Noun * Event ==> Occurs when the — Form and Controls user takes action ae — User clicks a button, User * Property ==> Adjective . perty uJ moves a form — Color of a Form ~ Size of Text * Class ==> Template to * Method ==> Verb create new object — Move a Form ~ Each control added is an Instance of a ClassObject Model Analogy oe) * Class = automobile * Properties = make, model, color, year * Object = each individual car — Object is an Instance of the automobile class * Methods = start, stop, speedup, slowdown « Eyents = car arrives, car crashes, car is purchasedDot Notation a; * Used to reference object's properties and a: methods in code — Object dot Property * Form.Text, TextBox.Text — Object dot Method * Form.Hide( ), TextBox.Focus( ) To reference an object's events use an underscore in the Private Sub name and use a dot in the Handles subclause of the Private Sub statement * Private Sub Button_Click () Handles Button.ClickVisual Basic.NET a ¢ Included in Visual Studio.NET — Visual Basic (can also be purchased separately) — C++ — C# — .NET Framework * Complete rewrite from VB Version 6Visual Studio.NET Editions @) * Academic ¢ Professional ¢ Enterprise Developer ¢ Enterprise Architect“a, Steps for Writing VB Projects a * Design/Define the User Interface * Plan/Set the Properties Plan/Write the Code ¢ Test and DebugVB Application Files ” “gk Open this file directly to work on a Project One Solution File sin Solution User Options File .Suo Project Files .vbproj Project User Options File Form Files Resource File for the Form .vbproj.user .vb .TeSXVisual Studio Environment g) * Integrated Development Environment (IDE) ¢ Form Designer ¢ Editor for entering code * Compiler ° Debugger ¢ Object BrowserVisual Studio IDE Start ee q , Start Po9e | eoroject Dialog “SD Visual Bask Projects Gy Setup and Deployment Projects (6-G Other Provects ‘visual studio Solutions: *— waza Class Library Windows Control Library a & & ASP.NET Web ASP.NET Web Web Control Application Service Library {A project For creating an pplication with a Windows user interface Name: MyVBProject Location: AMY VOProjects Project will be created at C:\MyVBProjects\MyVBProject. _stee_| aIDE Main Window Toolbars Document Window ° Form Designer Solution Explorer Properties Window Toolbox Class View ° Dynamic Helpsalneaie ga Ste oe Femi. Desi] |VB Toolbox ¢ Holds the tools you place on a form fbi TextBox & manmenu WM checkbox © RadioButton ] GroupBox laf] PictureBox (2 Panel SL DataGrid EW ListBox ED CheckedtistBox [3 ComboBox General Clipboard RingVisual Studio Help a 3 ¢ Extensive Help feature * Includes Microsoft Developer Network library (MSDN) ¢ Entire reference manual * Coding examplesModes * Design Time ¢ Run Time ¢ Break Time “Look at the Title Bar”Naming Conventions (p 43-44) a aa ¢ Always use standard names for objects * No spaces or punctuation marks * 3 letter lowercase prefix identifies control type » Button-bin * Label-lbl * Form-fim ¢ If multiple words capitalize 1st letter of each wordRecommended Naming Conventions for VB Objects Object Class Prefix | Example Form frm frmDataEntry Button btn btnExit TextBox txt txtPaymentAmount Label Ibl IbITotal Radio Button rad radBold CheckBox chk chkPrintSummary Horizontal ScrollBar | hsb hsbRate Vertical ScrollBar vsb vsbTemperature PictureBox pic picLandscape ComboBox cbo cboBookList ListBox Ist IstIndegredientsHello World Project (p 13) a ¥ Design the User Interface * Eien IbIMessage btnPush btnExitSet the Properties * Label — Name — Text * Button 1 — Name = Text ¢ Button 2 — Name — Text * Form — Name =] Text IblMessage leave blank btnPush Push Me btnExit Exit frmHello Hello World by your name| © (DynamicProperties re Rename Labell AccessibleDescri to IbIMessage AccessibleName AccessibleRole Default AllowDrop False (Name) Indicates the name used in code to identify the object.Set the Project's Startup a; Object Re * The default startup object is Form! * The name of the form should always be changed to adhere to naming rules ¢ Using Project menu, Properties change the startup object to match the new nameWrite the Code a “igh St While the project is running the user can perform actions Each action by the user causes an Event to occur Write code for the events you care about, the events you want to respond with code Code is written as event procedures VB will ignore events for which you do not write codeEditor Window ¢ Declarations Section * Class list ¢ Method list [?efrmttetto =] [g@btnPush_click > =| Public Class frmiello Inherits System.Windows.Forms.Form » a Private Sub btnPush Click(ByVal sender As System.Object, By' | End Sub End ClassRemark Statement a) « Also known as Comments, used for documentation ¢ Non-executable * Automatically colored Green in Editor * Begins with an apostrophe (' ) — Ona separate line from executable code — At the right end of a line of executable code ' Display the Hello World messageAssignment Statement oe * Assigns a value to a property or variable * Operates from right to left ¢ Enclose text strings in quotation marks ("") IbIMessage.Text="(Hello World)"Ending a Program a ¢ Execute the Close Method of the Form * Methods always have parentheses (this will help you distinguish them from Properties which never have parentheses) ¢ Current Form may be referenced as Me Me.Close( )Test and Debug * Save Project - File Menu, Save All * Run Project — Debug Menu, Start — Start Without Full Compile >| (FS) — Start With Full Compile (CTRL F5) ¢ Correct any Errors and Rerun — Compile errors — Run-Time Errors — Logic errors — Syntax errorsPrint the Code ¢ File Menu, Print * Prints complete code listing ¢ Uses arrow symbol / to denote line continuation * Examine sample output (Handout)Finding and Fixing Errors ow nae: * Syntax Errors (easy to see in editor) ¢ Run-Time Errors (identified when executed) ¢ Logic Errors (harder to find)
You might also like
The Subtle Art of Not Giving a F*ck: A Counterintuitive Approach to Living a Good Life
From Everand
The Subtle Art of Not Giving a F*ck: A Counterintuitive Approach to Living a Good Life
Mark Manson
4/5 (6125)
Principles: Life and Work
From Everand
Principles: Life and Work
Ray Dalio
4/5 (627)
The Gifts of Imperfection: Let Go of Who You Think You're Supposed to Be and Embrace Who You Are
From Everand
The Gifts of Imperfection: Let Go of Who You Think You're Supposed to Be and Embrace Who You Are
Brené Brown
4/5 (1148)
Never Split the Difference: Negotiating As If Your Life Depended On It
From Everand
Never Split the Difference: Negotiating As If Your Life Depended On It
Chris Voss
4.5/5 (932)
The Glass Castle: A Memoir
From Everand
The Glass Castle: A Memoir
Jeannette Walls
4/5 (8214)
Grit: The Power of Passion and Perseverance
From Everand
Grit: The Power of Passion and Perseverance
Angela Duckworth
4/5 (631)
Sing, Unburied, Sing: A Novel
From Everand
Sing, Unburied, Sing: A Novel
Jesmyn Ward
4/5 (1253)
The Perks of Being a Wallflower
From Everand
The Perks of Being a Wallflower
Stephen Chbosky
4/5 (8365)
Shoe Dog: A Memoir by the Creator of Nike
From Everand
Shoe Dog: A Memoir by the Creator of Nike
Phil Knight
4.5/5 (860)
Her Body and Other Parties: Stories
From Everand
Her Body and Other Parties: Stories
Carmen Maria Machado
4/5 (877)
Hidden Figures: The American Dream and the Untold Story of the Black Women Mathematicians Who Helped Win the Space Race
From Everand
Hidden Figures: The American Dream and the Untold Story of the Black Women Mathematicians Who Helped Win the Space Race
Margot Lee Shetterly
4/5 (954)
The Hard Thing About Hard Things: Building a Business When There Are No Easy Answers
From Everand
The Hard Thing About Hard Things: Building a Business When There Are No Easy Answers
Ben Horowitz
4.5/5 (361)
Steve Jobs
From Everand
Steve Jobs
Walter Isaacson
4/5 (2922)
Elon Musk: Tesla, SpaceX, and the Quest for a Fantastic Future
From Everand
Elon Musk: Tesla, SpaceX, and the Quest for a Fantastic Future
Ashlee Vance
4.5/5 (484)
The Emperor of All Maladies: A Biography of Cancer
From Everand
The Emperor of All Maladies: A Biography of Cancer
Siddhartha Mukherjee
4.5/5 (277)
A Man Called Ove: A Novel
From Everand
A Man Called Ove: A Novel
Fredrik Backman
4.5/5 (4972)
Angela's Ashes: A Memoir
From Everand
Angela's Ashes: A Memoir
Frank McCourt
4.5/5 (444)
Brooklyn: A Novel
From Everand
Brooklyn: A Novel
Colm Tóibín
3.5/5 (2061)
The Art of Racing in the Rain: A Novel
From Everand
The Art of Racing in the Rain: A Novel
Garth Stein
4/5 (4281)
The Yellow House: A Memoir (2019 National Book Award Winner)
From Everand
The Yellow House: A Memoir (2019 National Book Award Winner)
Sarah M. Broom
4/5 (100)
The Little Book of Hygge: Danish Secrets to Happy Living
From Everand
The Little Book of Hygge: Danish Secrets to Happy Living
Meik Wiking
3.5/5 (447)
The World Is Flat 3.0: A Brief History of the Twenty-first Century
From Everand
The World Is Flat 3.0: A Brief History of the Twenty-first Century
Thomas L. Friedman
3.5/5 (2283)
Bad Feminist: Essays
From Everand
Bad Feminist: Essays
Roxane Gay
4/5 (1068)
Yes Please
From Everand
Yes Please
Amy Poehler
4/5 (1987)
Devil in the Grove: Thurgood Marshall, the Groveland Boys, and the Dawn of a New America
From Everand
Devil in the Grove: Thurgood Marshall, the Groveland Boys, and the Dawn of a New America
Gilbert King
4.5/5 (278)
The Outsider: A Novel
From Everand
The Outsider: A Novel
Stephen King
4/5 (1993)
The Woman in Cabin 10
From Everand
The Woman in Cabin 10
Ruth Ware
3.5/5 (2641)
A Tree Grows in Brooklyn
From Everand
A Tree Grows in Brooklyn
Betty Smith
4.5/5 (1936)
The Sympathizer: A Novel (Pulitzer Prize for Fiction)
From Everand
The Sympathizer: A Novel (Pulitzer Prize for Fiction)
Viet Thanh Nguyen
4.5/5 (125)
A Heartbreaking Work Of Staggering Genius: A Memoir Based on a True Story
From Everand
A Heartbreaking Work Of Staggering Genius: A Memoir Based on a True Story
Dave Eggers
3.5/5 (692)
Team of Rivals: The Political Genius of Abraham Lincoln
From Everand
Team of Rivals: The Political Genius of Abraham Lincoln
Doris Kearns Goodwin
4.5/5 (1912)
Wolf Hall: A Novel
From Everand
Wolf Hall: A Novel
Hilary Mantel
4/5 (4074)
On Fire: The (Burning) Case for a Green New Deal
From Everand
On Fire: The (Burning) Case for a Green New Deal
Naomi Klein
4/5 (75)
Fear: Trump in the White House
From Everand
Fear: Trump in the White House
Bob Woodward
3.5/5 (830)
Rise of ISIS: A Threat We Can't Ignore
From Everand
Rise of ISIS: A Threat We Can't Ignore
Jay Sekulow
3.5/5 (143)
Manhattan Beach: A Novel
From Everand
Manhattan Beach: A Novel
Jennifer Egan
3.5/5 (901)
John Adams
From Everand
John Adams
David McCullough
4.5/5 (2530)
The Light Between Oceans: A Novel
From Everand
The Light Between Oceans: A Novel
M L Stedman
4.5/5 (790)
WEEK 2_2D GAME ART DEV
PDF
No ratings yet
WEEK 2_2D GAME ART DEV
4 pages
slidesaver.app_whcuaq
PDF
No ratings yet
slidesaver.app_whcuaq
18 pages
Introduction to Visual Basic.NET Programming In Visual Basic.NET. - 20250114_190509
PDF
No ratings yet
Introduction to Visual Basic.NET Programming In Visual Basic.NET. - 20250114_190509
32 pages
Long Quiz Part5 and 6
PDF
No ratings yet
Long Quiz Part5 and 6
18 pages
Long Quiz Mil Lesson 3 and 4
PDF
No ratings yet
Long Quiz Mil Lesson 3 and 4
34 pages
Long Quiz #1
PDF
No ratings yet
Long Quiz #1
36 pages
Tagline Games
PDF
No ratings yet
Tagline Games
50 pages
CSS3 Part 1 and 2 LONG qUIZ
PDF
No ratings yet
CSS3 Part 1 and 2 LONG qUIZ
19 pages
Organizing The Production
PDF
No ratings yet
Organizing The Production
23 pages
Serverspaperpresentation 120107050051 Phpapp01
PDF
No ratings yet
Serverspaperpresentation 120107050051 Phpapp01
24 pages
The Unwinding: An Inner History of the New America
From Everand
The Unwinding: An Inner History of the New America
George Packer
4/5 (45)
Little Women
From Everand
Little Women
Louisa May Alcott
4/5 (105)
The Constant Gardener: A Novel
From Everand
The Constant Gardener: A Novel
John le Carré
3.5/5 (109)
Related titles
Click to expand Related Titles
Carousel Previous
Carousel Next
The Subtle Art of Not Giving a F*ck: A Counterintuitive Approach to Living a Good Life
From Everand
The Subtle Art of Not Giving a F*ck: A Counterintuitive Approach to Living a Good Life
Principles: Life and Work
From Everand
Principles: Life and Work
The Gifts of Imperfection: Let Go of Who You Think You're Supposed to Be and Embrace Who You Are
From Everand
The Gifts of Imperfection: Let Go of Who You Think You're Supposed to Be and Embrace Who You Are
Never Split the Difference: Negotiating As If Your Life Depended On It
From Everand
Never Split the Difference: Negotiating As If Your Life Depended On It
The Glass Castle: A Memoir
From Everand
The Glass Castle: A Memoir
Grit: The Power of Passion and Perseverance
From Everand
Grit: The Power of Passion and Perseverance
Sing, Unburied, Sing: A Novel
From Everand
Sing, Unburied, Sing: A Novel
The Perks of Being a Wallflower
From Everand
The Perks of Being a Wallflower
Shoe Dog: A Memoir by the Creator of Nike
From Everand
Shoe Dog: A Memoir by the Creator of Nike
Her Body and Other Parties: Stories
From Everand
Her Body and Other Parties: Stories
Hidden Figures: The American Dream and the Untold Story of the Black Women Mathematicians Who Helped Win the Space Race
From Everand
Hidden Figures: The American Dream and the Untold Story of the Black Women Mathematicians Who Helped Win the Space Race
The Hard Thing About Hard Things: Building a Business When There Are No Easy Answers
From Everand
The Hard Thing About Hard Things: Building a Business When There Are No Easy Answers
Steve Jobs
From Everand
Steve Jobs
Elon Musk: Tesla, SpaceX, and the Quest for a Fantastic Future
From Everand
Elon Musk: Tesla, SpaceX, and the Quest for a Fantastic Future
The Emperor of All Maladies: A Biography of Cancer
From Everand
The Emperor of All Maladies: A Biography of Cancer
A Man Called Ove: A Novel
From Everand
A Man Called Ove: A Novel
Angela's Ashes: A Memoir
From Everand
Angela's Ashes: A Memoir
Brooklyn: A Novel
From Everand
Brooklyn: A Novel
The Art of Racing in the Rain: A Novel
From Everand
The Art of Racing in the Rain: A Novel
The Yellow House: A Memoir (2019 National Book Award Winner)
From Everand
The Yellow House: A Memoir (2019 National Book Award Winner)
The Little Book of Hygge: Danish Secrets to Happy Living
From Everand
The Little Book of Hygge: Danish Secrets to Happy Living
The World Is Flat 3.0: A Brief History of the Twenty-first Century
From Everand
The World Is Flat 3.0: A Brief History of the Twenty-first Century
Bad Feminist: Essays
From Everand
Bad Feminist: Essays
Yes Please
From Everand
Yes Please
Devil in the Grove: Thurgood Marshall, the Groveland Boys, and the Dawn of a New America
From Everand
Devil in the Grove: Thurgood Marshall, the Groveland Boys, and the Dawn of a New America
The Outsider: A Novel
From Everand
The Outsider: A Novel
The Woman in Cabin 10
From Everand
The Woman in Cabin 10
A Tree Grows in Brooklyn
From Everand
A Tree Grows in Brooklyn
The Sympathizer: A Novel (Pulitzer Prize for Fiction)
From Everand
The Sympathizer: A Novel (Pulitzer Prize for Fiction)
A Heartbreaking Work Of Staggering Genius: A Memoir Based on a True Story
From Everand
A Heartbreaking Work Of Staggering Genius: A Memoir Based on a True Story
Team of Rivals: The Political Genius of Abraham Lincoln
From Everand
Team of Rivals: The Political Genius of Abraham Lincoln
Wolf Hall: A Novel
From Everand
Wolf Hall: A Novel
On Fire: The (Burning) Case for a Green New Deal
From Everand
On Fire: The (Burning) Case for a Green New Deal
Fear: Trump in the White House
From Everand
Fear: Trump in the White House
Rise of ISIS: A Threat We Can't Ignore
From Everand
Rise of ISIS: A Threat We Can't Ignore
Manhattan Beach: A Novel
From Everand
Manhattan Beach: A Novel
John Adams
From Everand
John Adams
The Light Between Oceans: A Novel
From Everand
The Light Between Oceans: A Novel
WEEK 2_2D GAME ART DEV
PDF
WEEK 2_2D GAME ART DEV
slidesaver.app_whcuaq
PDF
slidesaver.app_whcuaq
Introduction to Visual Basic.NET Programming In Visual Basic.NET. - 20250114_190509
PDF
Introduction to Visual Basic.NET Programming In Visual Basic.NET. - 20250114_190509
Long Quiz Part5 and 6
PDF
Long Quiz Part5 and 6
Long Quiz Mil Lesson 3 and 4
PDF
Long Quiz Mil Lesson 3 and 4
Long Quiz #1
PDF
Long Quiz #1
Tagline Games
PDF
Tagline Games
CSS3 Part 1 and 2 LONG qUIZ
PDF
CSS3 Part 1 and 2 LONG qUIZ
Organizing The Production
PDF
Organizing The Production
Serverspaperpresentation 120107050051 Phpapp01
PDF
Serverspaperpresentation 120107050051 Phpapp01
The Unwinding: An Inner History of the New America
From Everand
The Unwinding: An Inner History of the New America
Little Women
From Everand
Little Women
The Constant Gardener: A Novel
From Everand
The Constant Gardener: A Novel