SlideShare a Scribd company logo
FEDT Presentation
GGS INDRAPRASTH UNIVERSITY
Submitted to Submitted
MANISH
BCA E1 2016-2019
TOPIC
Button control in VB.NET
VISUAL BASIC INTERFACE
When we write a Visual Basic program, you first have to
design the user interface. Essentially, a Visual Basic user
interface consists of objects that you place on the screen.
The common elements of a Visual Basic user interface
consist of the following:
•Forms (also known as windows)
•Buttons (such as command buttons and radio buttons)
•Boxes (such as text boxes and check boxes)
•Labels
•Pictures (such as icons and graphics)
BUTTON
The button control is your standard GUI function, usually
used to confirm something or trigger an event. Such uses
for a button include search engine's, dialog boxes, message
boxes, etc. They are usually used to give the user an option
or choice.
Button can be clicked by a mouse click or by pressing
ENTER or ESC keys.
CREATING A BUTTON
BY DRAG & DROP
To create a Button control, you simply drag and drop a
Button control from Toolbox to Form in Visual Studio.
CREATING A BUTTON
AT RUN-TIME
VB.Net allow us to add button at run time by typing code:-
Dim button1 as new button
Me.Controls.Add(button1)
PROPERTIES OF THE
BUTTON CONTROL
1 AutoSizeMode Gets or sets the mode by which the Button
automatically resizes itself.
2 BackColor Gets or sets the background color of the
control.
3 BackgroundImage Gets or sets the background image
displayed in the control.
4 DialogResult Gets or sets a value that is returned to the
parent form when the button is clicked.
This is used while creating dialog boxes.
5 ForeColor Gets or sets the foreground color of the
control.
6 Image Gets or sets the image that is displayed on
a button control.
7 Location Gets or sets the coordinates of the upper-
left corner of the control relative to the
upper-left corner of its container.
8 TabIndex Gets or sets the tab order of the control
within its container.
9 Text Gets or sets the text associated with this
control.
WORKING OF
BUTTON
When we click the button a handler is executed.
Private Sub Button1_Click(sender As Object, e As EventArgs)
Handles Button1.Click
After it we can give instructions that will be done after the button
click.
Button sub is End by using End sub
EXAMPLE
Check odd even.
Interface
CODE
Public Class Form1
Private Sub Button1_Click(sender As Object, e As EventArgs)
Handles Button1.Click
Dim a As Integer = TextBox1.Text
If a Mod 2 = 0 Then
MsgBox("No is even")
Else
MsgBox("No is odd")
End If
End Sub
End Class
Statement that will be
executed after button
click
OUTPUT
THANK YOU

More Related Content

What's hot

Multithreading in java
Multithreading in javaMultithreading in java
Multithreading in java
Monika Mishra
 
Applets in java
Applets in javaApplets in java
Applets in java
Wani Zahoor
 
MULTI THREADING IN JAVA
MULTI THREADING IN JAVAMULTI THREADING IN JAVA
MULTI THREADING IN JAVA
VINOTH R
 
Protection
ProtectionProtection
Packages in java
Packages in javaPackages in java
Packages in java
Elizabeth alexander
 
Visual Basic IDE Introduction
Visual Basic IDE IntroductionVisual Basic IDE Introduction
Visual Basic IDE Introduction
Ahllen Javier
 
java Unit4 chapter1 applets
java Unit4 chapter1 appletsjava Unit4 chapter1 applets
java Unit4 chapter1 applets
raksharao
 
Visual Basic Controls ppt
Visual Basic Controls pptVisual Basic Controls ppt
Visual Basic Controls ppt
Ranjuma Shubhangi
 
Event Handling in java
Event Handling in javaEvent Handling in java
Event Handling in java
Google
 
Protection and Security in Operating Systems
Protection and Security in Operating SystemsProtection and Security in Operating Systems
Protection and Security in Operating Systems
vampugani
 
Exception Handling in VB.Net
Exception Handling in VB.NetException Handling in VB.Net
Exception Handling in VB.Net
rishisingh190
 
Recognition-of-tokens
Recognition-of-tokensRecognition-of-tokens
Recognition-of-tokens
Dattatray Gandhmal
 
Popup boxes
Popup boxesPopup boxes
Popup boxes
sonal bisla
 
Finalize() method
Finalize() methodFinalize() method
Finalize() method
Jadavsejal
 
Operating System - Monitors (Presentation)
Operating System - Monitors (Presentation)Operating System - Monitors (Presentation)
Operating System - Monitors (Presentation)
Experts Desk
 
Swing and AWT in java
Swing and AWT in javaSwing and AWT in java
Swing and AWT in java
Adil Mehmoood
 
Operating Systems: Device Management
Operating Systems: Device ManagementOperating Systems: Device Management
Operating Systems: Device Management
Damian T. Gordon
 
process control blockPcb
process control blockPcbprocess control blockPcb
process control blockPcbParul Shree
 

What's hot (20)

Multithreading in java
Multithreading in javaMultithreading in java
Multithreading in java
 
Applets in java
Applets in javaApplets in java
Applets in java
 
MULTI THREADING IN JAVA
MULTI THREADING IN JAVAMULTI THREADING IN JAVA
MULTI THREADING IN JAVA
 
Protection
ProtectionProtection
Protection
 
Packages in java
Packages in javaPackages in java
Packages in java
 
Visual Basic IDE Introduction
Visual Basic IDE IntroductionVisual Basic IDE Introduction
Visual Basic IDE Introduction
 
java Unit4 chapter1 applets
java Unit4 chapter1 appletsjava Unit4 chapter1 applets
java Unit4 chapter1 applets
 
Visual Basic Controls ppt
Visual Basic Controls pptVisual Basic Controls ppt
Visual Basic Controls ppt
 
Event Handling in java
Event Handling in javaEvent Handling in java
Event Handling in java
 
3 d viewing
3 d viewing3 d viewing
3 d viewing
 
Protection and Security in Operating Systems
Protection and Security in Operating SystemsProtection and Security in Operating Systems
Protection and Security in Operating Systems
 
Paging and segmentation
Paging and segmentationPaging and segmentation
Paging and segmentation
 
Exception Handling in VB.Net
Exception Handling in VB.NetException Handling in VB.Net
Exception Handling in VB.Net
 
Recognition-of-tokens
Recognition-of-tokensRecognition-of-tokens
Recognition-of-tokens
 
Popup boxes
Popup boxesPopup boxes
Popup boxes
 
Finalize() method
Finalize() methodFinalize() method
Finalize() method
 
Operating System - Monitors (Presentation)
Operating System - Monitors (Presentation)Operating System - Monitors (Presentation)
Operating System - Monitors (Presentation)
 
Swing and AWT in java
Swing and AWT in javaSwing and AWT in java
Swing and AWT in java
 
Operating Systems: Device Management
Operating Systems: Device ManagementOperating Systems: Device Management
Operating Systems: Device Management
 
process control blockPcb
process control blockPcbprocess control blockPcb
process control blockPcb
 

Similar to Buttons In .net Visual Basic

Vp lecture1 ararat
Vp lecture1 araratVp lecture1 ararat
Vp lecture1 ararat
Saman M. Almufti
 
Vs c# lecture1
Vs c# lecture1Vs c# lecture1
Vs c# lecture1
Saman M. Almufti
 
Visual Basic IDE Intro.pdf
Visual Basic IDE Intro.pdfVisual Basic IDE Intro.pdf
Visual Basic IDE Intro.pdf
sheenmarie0212
 
Lecture 3 INTRODUCTION TO COMPUTER
Lecture 3 INTRODUCTION TO COMPUTERLecture 3 INTRODUCTION TO COMPUTER
Lecture 3 INTRODUCTION TO COMPUTER
Sultan Omar Shige
 
VB PPT by ADI PART4.pdf
VB PPT by ADI PART4.pdfVB PPT by ADI PART4.pdf
VB PPT by ADI PART4.pdf
AdiseshaK
 
VB PPT by ADI PART4.pdf
VB PPT by ADI PART4.pdfVB PPT by ADI PART4.pdf
VB PPT by ADI PART4.pdf
Prof. Dr. K. Adisesha
 
lesson-9-Building-Windows-Form-Application.pptx
lesson-9-Building-Windows-Form-Application.pptxlesson-9-Building-Windows-Form-Application.pptx
lesson-9-Building-Windows-Form-Application.pptx
theriverflows213
 
lesson-9-Building-Windows-Form-Application.pptx
lesson-9-Building-Windows-Form-Application.pptxlesson-9-Building-Windows-Form-Application.pptx
lesson-9-Building-Windows-Form-Application.pptx
theriverflows213
 
Introduction to programming using Visual Basic 6
Introduction to programming using Visual Basic 6Introduction to programming using Visual Basic 6
Introduction to programming using Visual Basic 6
Jeanie Arnoco
 
Basic After Effect & Animation GIF (J&T Express)
Basic After Effect & Animation GIF (J&T Express)Basic After Effect & Animation GIF (J&T Express)
Basic After Effect & Animation GIF (J&T Express)
IzzuwanIsmail
 
Gui builder
Gui builderGui builder
Gui builderlearnt
 
Bea's powerpoint presentation
Bea's powerpoint presentationBea's powerpoint presentation
Bea's powerpoint presentationBea Nelene A. Que
 
Bea's powerpoint presentation
Bea's powerpoint presentationBea's powerpoint presentation
Bea's powerpoint presentationBea Nelene A. Que
 
Windowforms controls c#
Windowforms controls c#Windowforms controls c#
Windowforms controls c#
prabhu rajendran
 
The visual studio start page is shown in the figure below
The visual studio start page is shown in the figure belowThe visual studio start page is shown in the figure below
The visual studio start page is shown in the figure belowTan Ps
 
Living in the IT Era L3.pptx
Living in the IT Era L3.pptxLiving in the IT Era L3.pptx
Living in the IT Era L3.pptx
elmervirtudazo1
 
GUI -THESIS123
GUI -THESIS123GUI -THESIS123
GUI -THESIS123
Aparna Reddy
 
How support caller ID phone number
How support caller ID phone numberHow support caller ID phone number
How support caller ID phone numbertopomax
 

Similar to Buttons In .net Visual Basic (20)

Vp lecture1 ararat
Vp lecture1 araratVp lecture1 ararat
Vp lecture1 ararat
 
Vs c# lecture1
Vs c# lecture1Vs c# lecture1
Vs c# lecture1
 
Visual Basic IDE Intro.pdf
Visual Basic IDE Intro.pdfVisual Basic IDE Intro.pdf
Visual Basic IDE Intro.pdf
 
Lecture 3 INTRODUCTION TO COMPUTER
Lecture 3 INTRODUCTION TO COMPUTERLecture 3 INTRODUCTION TO COMPUTER
Lecture 3 INTRODUCTION TO COMPUTER
 
Point&Click
Point&ClickPoint&Click
Point&Click
 
VB PPT by ADI PART4.pdf
VB PPT by ADI PART4.pdfVB PPT by ADI PART4.pdf
VB PPT by ADI PART4.pdf
 
VB PPT by ADI PART4.pdf
VB PPT by ADI PART4.pdfVB PPT by ADI PART4.pdf
VB PPT by ADI PART4.pdf
 
lesson-9-Building-Windows-Form-Application.pptx
lesson-9-Building-Windows-Form-Application.pptxlesson-9-Building-Windows-Form-Application.pptx
lesson-9-Building-Windows-Form-Application.pptx
 
lesson-9-Building-Windows-Form-Application.pptx
lesson-9-Building-Windows-Form-Application.pptxlesson-9-Building-Windows-Form-Application.pptx
lesson-9-Building-Windows-Form-Application.pptx
 
Introduction to programming using Visual Basic 6
Introduction to programming using Visual Basic 6Introduction to programming using Visual Basic 6
Introduction to programming using Visual Basic 6
 
Basic After Effect & Animation GIF (J&T Express)
Basic After Effect & Animation GIF (J&T Express)Basic After Effect & Animation GIF (J&T Express)
Basic After Effect & Animation GIF (J&T Express)
 
Gui builder
Gui builderGui builder
Gui builder
 
Bea's powerpoint presentation
Bea's powerpoint presentationBea's powerpoint presentation
Bea's powerpoint presentation
 
Bea's powerpoint presentation
Bea's powerpoint presentationBea's powerpoint presentation
Bea's powerpoint presentation
 
Windowforms controls c#
Windowforms controls c#Windowforms controls c#
Windowforms controls c#
 
Introduction
IntroductionIntroduction
Introduction
 
The visual studio start page is shown in the figure below
The visual studio start page is shown in the figure belowThe visual studio start page is shown in the figure below
The visual studio start page is shown in the figure below
 
Living in the IT Era L3.pptx
Living in the IT Era L3.pptxLiving in the IT Era L3.pptx
Living in the IT Era L3.pptx
 
GUI -THESIS123
GUI -THESIS123GUI -THESIS123
GUI -THESIS123
 
How support caller ID phone number
How support caller ID phone numberHow support caller ID phone number
How support caller ID phone number
 

More from manish maurya

Do,Do while loop .net Visual Basic
Do,Do while loop .net Visual BasicDo,Do while loop .net Visual Basic
Do,Do while loop .net Visual Basic
manish maurya
 
Recursive Function PPT C lang
Recursive Function PPT C langRecursive Function PPT C lang
Recursive Function PPT C lang
manish maurya
 
Function-Definition, Need, Declaration, Definition, Arguments, Return Value
Function-Definition, Need, Declaration, Definition, Arguments, Return ValueFunction-Definition, Need, Declaration, Definition, Arguments, Return Value
Function-Definition, Need, Declaration, Definition, Arguments, Return Value
manish maurya
 
Fast and secure protocol FASP
Fast and secure protocol FASPFast and secure protocol FASP
Fast and secure protocol FASP
manish maurya
 
ISO 14000 Environmental Management System
ISO 14000  Environmental Management SystemISO 14000  Environmental Management System
ISO 14000 Environmental Management System
manish maurya
 
MICR magnetic ink character reader
MICR magnetic ink character readerMICR magnetic ink character reader
MICR magnetic ink character reader
manish maurya
 

More from manish maurya (6)

Do,Do while loop .net Visual Basic
Do,Do while loop .net Visual BasicDo,Do while loop .net Visual Basic
Do,Do while loop .net Visual Basic
 
Recursive Function PPT C lang
Recursive Function PPT C langRecursive Function PPT C lang
Recursive Function PPT C lang
 
Function-Definition, Need, Declaration, Definition, Arguments, Return Value
Function-Definition, Need, Declaration, Definition, Arguments, Return ValueFunction-Definition, Need, Declaration, Definition, Arguments, Return Value
Function-Definition, Need, Declaration, Definition, Arguments, Return Value
 
Fast and secure protocol FASP
Fast and secure protocol FASPFast and secure protocol FASP
Fast and secure protocol FASP
 
ISO 14000 Environmental Management System
ISO 14000  Environmental Management SystemISO 14000  Environmental Management System
ISO 14000 Environmental Management System
 
MICR magnetic ink character reader
MICR magnetic ink character readerMICR magnetic ink character reader
MICR magnetic ink character reader
 

Recently uploaded

一比一原版(UofT毕业证)多伦多大学毕业证成绩单如何办理
一比一原版(UofT毕业证)多伦多大学毕业证成绩单如何办理一比一原版(UofT毕业证)多伦多大学毕业证成绩单如何办理
一比一原版(UofT毕业证)多伦多大学毕业证成绩单如何办理
ydteq
 
The role of big data in decision making.
The role of big data in decision making.The role of big data in decision making.
The role of big data in decision making.
ankuprajapati0525
 
weather web application report.pdf
weather web application report.pdfweather web application report.pdf
weather web application report.pdf
Pratik Pawar
 
Hybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdf
Hybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdfHybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdf
Hybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdf
fxintegritypublishin
 
Final project report on grocery store management system..pdf
Final project report on grocery store management system..pdfFinal project report on grocery store management system..pdf
Final project report on grocery store management system..pdf
Kamal Acharya
 
space technology lecture notes on satellite
space technology lecture notes on satellitespace technology lecture notes on satellite
space technology lecture notes on satellite
ongomchris
 
Pile Foundation by Venkatesh Taduvai (Sub Geotechnical Engineering II)-conver...
Pile Foundation by Venkatesh Taduvai (Sub Geotechnical Engineering II)-conver...Pile Foundation by Venkatesh Taduvai (Sub Geotechnical Engineering II)-conver...
Pile Foundation by Venkatesh Taduvai (Sub Geotechnical Engineering II)-conver...
AJAYKUMARPUND1
 
H.Seo, ICLR 2024, MLILAB, KAIST AI.pdf
H.Seo,  ICLR 2024, MLILAB,  KAIST AI.pdfH.Seo,  ICLR 2024, MLILAB,  KAIST AI.pdf
H.Seo, ICLR 2024, MLILAB, KAIST AI.pdf
MLILAB
 
block diagram and signal flow graph representation
block diagram and signal flow graph representationblock diagram and signal flow graph representation
block diagram and signal flow graph representation
Divya Somashekar
 
在线办理(ANU毕业证书)澳洲国立大学毕业证录取通知书一模一样
在线办理(ANU毕业证书)澳洲国立大学毕业证录取通知书一模一样在线办理(ANU毕业证书)澳洲国立大学毕业证录取通知书一模一样
在线办理(ANU毕业证书)澳洲国立大学毕业证录取通知书一模一样
obonagu
 
road safety engineering r s e unit 3.pdf
road safety engineering  r s e unit 3.pdfroad safety engineering  r s e unit 3.pdf
road safety engineering r s e unit 3.pdf
VENKATESHvenky89705
 
Standard Reomte Control Interface - Neometrix
Standard Reomte Control Interface - NeometrixStandard Reomte Control Interface - Neometrix
Standard Reomte Control Interface - Neometrix
Neometrix_Engineering_Pvt_Ltd
 
Hierarchical Digital Twin of a Naval Power System
Hierarchical Digital Twin of a Naval Power SystemHierarchical Digital Twin of a Naval Power System
Hierarchical Digital Twin of a Naval Power System
Kerry Sado
 
Planning Of Procurement o different goods and services
Planning Of Procurement o different goods and servicesPlanning Of Procurement o different goods and services
Planning Of Procurement o different goods and services
JoytuBarua2
 
一比一原版(SFU毕业证)西蒙菲莎大学毕业证成绩单如何办理
一比一原版(SFU毕业证)西蒙菲莎大学毕业证成绩单如何办理一比一原版(SFU毕业证)西蒙菲莎大学毕业证成绩单如何办理
一比一原版(SFU毕业证)西蒙菲莎大学毕业证成绩单如何办理
bakpo1
 
NO1 Uk best vashikaran specialist in delhi vashikaran baba near me online vas...
NO1 Uk best vashikaran specialist in delhi vashikaran baba near me online vas...NO1 Uk best vashikaran specialist in delhi vashikaran baba near me online vas...
NO1 Uk best vashikaran specialist in delhi vashikaran baba near me online vas...
Amil Baba Dawood bangali
 
Architectural Portfolio Sean Lockwood
Architectural Portfolio Sean LockwoodArchitectural Portfolio Sean Lockwood
Architectural Portfolio Sean Lockwood
seandesed
 
Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...
Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...
Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...
Dr.Costas Sachpazis
 
HYDROPOWER - Hydroelectric power generation
HYDROPOWER - Hydroelectric power generationHYDROPOWER - Hydroelectric power generation
HYDROPOWER - Hydroelectric power generation
Robbie Edward Sayers
 
ethical hacking in wireless-hacking1.ppt
ethical hacking in wireless-hacking1.pptethical hacking in wireless-hacking1.ppt
ethical hacking in wireless-hacking1.ppt
Jayaprasanna4
 

Recently uploaded (20)

一比一原版(UofT毕业证)多伦多大学毕业证成绩单如何办理
一比一原版(UofT毕业证)多伦多大学毕业证成绩单如何办理一比一原版(UofT毕业证)多伦多大学毕业证成绩单如何办理
一比一原版(UofT毕业证)多伦多大学毕业证成绩单如何办理
 
The role of big data in decision making.
The role of big data in decision making.The role of big data in decision making.
The role of big data in decision making.
 
weather web application report.pdf
weather web application report.pdfweather web application report.pdf
weather web application report.pdf
 
Hybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdf
Hybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdfHybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdf
Hybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdf
 
Final project report on grocery store management system..pdf
Final project report on grocery store management system..pdfFinal project report on grocery store management system..pdf
Final project report on grocery store management system..pdf
 
space technology lecture notes on satellite
space technology lecture notes on satellitespace technology lecture notes on satellite
space technology lecture notes on satellite
 
Pile Foundation by Venkatesh Taduvai (Sub Geotechnical Engineering II)-conver...
Pile Foundation by Venkatesh Taduvai (Sub Geotechnical Engineering II)-conver...Pile Foundation by Venkatesh Taduvai (Sub Geotechnical Engineering II)-conver...
Pile Foundation by Venkatesh Taduvai (Sub Geotechnical Engineering II)-conver...
 
H.Seo, ICLR 2024, MLILAB, KAIST AI.pdf
H.Seo,  ICLR 2024, MLILAB,  KAIST AI.pdfH.Seo,  ICLR 2024, MLILAB,  KAIST AI.pdf
H.Seo, ICLR 2024, MLILAB, KAIST AI.pdf
 
block diagram and signal flow graph representation
block diagram and signal flow graph representationblock diagram and signal flow graph representation
block diagram and signal flow graph representation
 
在线办理(ANU毕业证书)澳洲国立大学毕业证录取通知书一模一样
在线办理(ANU毕业证书)澳洲国立大学毕业证录取通知书一模一样在线办理(ANU毕业证书)澳洲国立大学毕业证录取通知书一模一样
在线办理(ANU毕业证书)澳洲国立大学毕业证录取通知书一模一样
 
road safety engineering r s e unit 3.pdf
road safety engineering  r s e unit 3.pdfroad safety engineering  r s e unit 3.pdf
road safety engineering r s e unit 3.pdf
 
Standard Reomte Control Interface - Neometrix
Standard Reomte Control Interface - NeometrixStandard Reomte Control Interface - Neometrix
Standard Reomte Control Interface - Neometrix
 
Hierarchical Digital Twin of a Naval Power System
Hierarchical Digital Twin of a Naval Power SystemHierarchical Digital Twin of a Naval Power System
Hierarchical Digital Twin of a Naval Power System
 
Planning Of Procurement o different goods and services
Planning Of Procurement o different goods and servicesPlanning Of Procurement o different goods and services
Planning Of Procurement o different goods and services
 
一比一原版(SFU毕业证)西蒙菲莎大学毕业证成绩单如何办理
一比一原版(SFU毕业证)西蒙菲莎大学毕业证成绩单如何办理一比一原版(SFU毕业证)西蒙菲莎大学毕业证成绩单如何办理
一比一原版(SFU毕业证)西蒙菲莎大学毕业证成绩单如何办理
 
NO1 Uk best vashikaran specialist in delhi vashikaran baba near me online vas...
NO1 Uk best vashikaran specialist in delhi vashikaran baba near me online vas...NO1 Uk best vashikaran specialist in delhi vashikaran baba near me online vas...
NO1 Uk best vashikaran specialist in delhi vashikaran baba near me online vas...
 
Architectural Portfolio Sean Lockwood
Architectural Portfolio Sean LockwoodArchitectural Portfolio Sean Lockwood
Architectural Portfolio Sean Lockwood
 
Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...
Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...
Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...
 
HYDROPOWER - Hydroelectric power generation
HYDROPOWER - Hydroelectric power generationHYDROPOWER - Hydroelectric power generation
HYDROPOWER - Hydroelectric power generation
 
ethical hacking in wireless-hacking1.ppt
ethical hacking in wireless-hacking1.pptethical hacking in wireless-hacking1.ppt
ethical hacking in wireless-hacking1.ppt
 

Buttons In .net Visual Basic

  • 1. FEDT Presentation GGS INDRAPRASTH UNIVERSITY Submitted to Submitted MANISH BCA E1 2016-2019
  • 3. VISUAL BASIC INTERFACE When we write a Visual Basic program, you first have to design the user interface. Essentially, a Visual Basic user interface consists of objects that you place on the screen. The common elements of a Visual Basic user interface consist of the following: •Forms (also known as windows) •Buttons (such as command buttons and radio buttons) •Boxes (such as text boxes and check boxes) •Labels •Pictures (such as icons and graphics)
  • 4. BUTTON The button control is your standard GUI function, usually used to confirm something or trigger an event. Such uses for a button include search engine's, dialog boxes, message boxes, etc. They are usually used to give the user an option or choice. Button can be clicked by a mouse click or by pressing ENTER or ESC keys.
  • 5. CREATING A BUTTON BY DRAG & DROP To create a Button control, you simply drag and drop a Button control from Toolbox to Form in Visual Studio.
  • 6. CREATING A BUTTON AT RUN-TIME VB.Net allow us to add button at run time by typing code:- Dim button1 as new button Me.Controls.Add(button1)
  • 7. PROPERTIES OF THE BUTTON CONTROL 1 AutoSizeMode Gets or sets the mode by which the Button automatically resizes itself. 2 BackColor Gets or sets the background color of the control. 3 BackgroundImage Gets or sets the background image displayed in the control. 4 DialogResult Gets or sets a value that is returned to the parent form when the button is clicked. This is used while creating dialog boxes. 5 ForeColor Gets or sets the foreground color of the control. 6 Image Gets or sets the image that is displayed on a button control. 7 Location Gets or sets the coordinates of the upper- left corner of the control relative to the upper-left corner of its container. 8 TabIndex Gets or sets the tab order of the control within its container. 9 Text Gets or sets the text associated with this control.
  • 8. WORKING OF BUTTON When we click the button a handler is executed. Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click After it we can give instructions that will be done after the button click. Button sub is End by using End sub
  • 10. CODE Public Class Form1 Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click Dim a As Integer = TextBox1.Text If a Mod 2 = 0 Then MsgBox("No is even") Else MsgBox("No is odd") End If End Sub End Class Statement that will be executed after button click