SlideShare a Scribd company logo
2
Most read
8
Most read
10
Most read
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 (20)

PPTX
Operator overloading
Ramish Suleman
 
PPTX
Load runner & win runner
Himanshu
 
PDF
Python programming : Control statements
Emertxe Information Technologies Pvt Ltd
 
PPTX
System software - macro expansion,nested macro calls
SARASWATHI S
 
PPTX
Hive and HiveQL - Module6
Rohit Agrawal
 
PPTX
Vb 6.0 controls
'Bharat Kumar
 
PPT
CSS ppt
Sanmuga Nathan
 
PPT
Visual basic 6.0
Aarti P
 
PPTX
Regular expressions in Python
Sujith Kumar
 
PPTX
Program security
Prachi Gulihar
 
PPTX
Controls events
Dalwin INDIA
 
PPT
C# Exceptions Handling
sharqiyem
 
PPTX
SQL(DDL & DML)
Sharad Dubey
 
PPTX
Filehandling
Amandeep Kaur
 
PPSX
ADO.NET
Farzad Wadia
 
PDF
Div tag presentation
alyssa_lum11
 
PPTX
7. check box control
chauhankapil
 
PPTX
Ado.Net Tutorial
prabhu rajendran
 
PPTX
Dynamic memory allocation
Viji B
 
Operator overloading
Ramish Suleman
 
Load runner & win runner
Himanshu
 
Python programming : Control statements
Emertxe Information Technologies Pvt Ltd
 
System software - macro expansion,nested macro calls
SARASWATHI S
 
Hive and HiveQL - Module6
Rohit Agrawal
 
Vb 6.0 controls
'Bharat Kumar
 
Visual basic 6.0
Aarti P
 
Regular expressions in Python
Sujith Kumar
 
Program security
Prachi Gulihar
 
Controls events
Dalwin INDIA
 
C# Exceptions Handling
sharqiyem
 
SQL(DDL & DML)
Sharad Dubey
 
Filehandling
Amandeep Kaur
 
ADO.NET
Farzad Wadia
 
Div tag presentation
alyssa_lum11
 
7. check box control
chauhankapil
 
Ado.Net Tutorial
prabhu rajendran
 
Dynamic memory allocation
Viji B
 

Similar to Buttons In .net Visual Basic (20)

PPTX
Vp lecture1 ararat
Saman M. Almufti
 
PPTX
Vs c# lecture1
Saman M. Almufti
 
PDF
Visual Basic IDE Introduction
Ahllen Javier
 
PDF
Visual Basic IDE Intro.pdf
sheenmarie0212
 
PPTX
Lecture 3 INTRODUCTION TO COMPUTER
Sultan Omar Shige
 
PDF
Pong 5a_pdf programmation dans scratch et mblock
ParlonsdeTout1
 
PDF
VB PPT by ADI PART4.pdf
AdiseshaK
 
PDF
VB PPT by ADI PART4.pdf
Prof. Dr. K. Adisesha
 
PPTX
lesson-9-Building-Windows-Form-Application.pptx
theriverflows213
 
PPTX
lesson-9-Building-Windows-Form-Application.pptx
theriverflows213
 
PPT
Introduction to programming using Visual Basic 6
Jeanie Arnoco
 
PPTX
Basic After Effect & Animation GIF (J&T Express)
IzzuwanIsmail
 
PDF
Gui builder
learnt
 
PPTX
Bea's powerpoint presentation
Bea Nelene A. Que
 
PPTX
Bea's powerpoint presentation
Bea Nelene A. Que
 
PPTX
Windowforms controls c#
prabhu rajendran
 
PDF
Introduction
شكسبير ويليام
 
DOCX
The visual studio start page is shown in the figure below
Tan Ps
 
PPTX
Living in the IT Era L3.pptx
elmervirtudazo1
 
Vp lecture1 ararat
Saman M. Almufti
 
Vs c# lecture1
Saman M. Almufti
 
Visual Basic IDE Introduction
Ahllen Javier
 
Visual Basic IDE Intro.pdf
sheenmarie0212
 
Lecture 3 INTRODUCTION TO COMPUTER
Sultan Omar Shige
 
Pong 5a_pdf programmation dans scratch et mblock
ParlonsdeTout1
 
VB PPT by ADI PART4.pdf
AdiseshaK
 
VB PPT by ADI PART4.pdf
Prof. Dr. K. Adisesha
 
lesson-9-Building-Windows-Form-Application.pptx
theriverflows213
 
lesson-9-Building-Windows-Form-Application.pptx
theriverflows213
 
Introduction to programming using Visual Basic 6
Jeanie Arnoco
 
Basic After Effect & Animation GIF (J&T Express)
IzzuwanIsmail
 
Gui builder
learnt
 
Bea's powerpoint presentation
Bea Nelene A. Que
 
Bea's powerpoint presentation
Bea Nelene A. Que
 
Windowforms controls c#
prabhu rajendran
 
The visual studio start page is shown in the figure below
Tan Ps
 
Living in the IT Era L3.pptx
elmervirtudazo1
 
Ad

More from manish maurya (6)

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

Recently uploaded (20)

PDF
Authentication Devices in Fog-mobile Edge Computing Environments through a Wi...
ijujournal
 
PPTX
template.pptxr4t5y67yrttttttttttttttttttttttttttttttttttt
SithamparanaathanPir
 
PPTX
Engineering Quiz ShowEngineering Quiz Show
CalvinLabial
 
PDF
Module - 5 Machine Learning-22ISE62.pdf
Dr. Shivashankar
 
PDF
June 2025 - Top 10 Read Articles in Network Security and Its Applications
IJNSA Journal
 
PDF
Tesia Dobrydnia - An Avid Hiker And Backpacker
Tesia Dobrydnia
 
PPTX
UNIT 1 - INTRODUCTION TO AI and AI tools and basic concept
gokuld13012005
 
PDF
CLIP_Internals_and_Architecture.pdf sdvsdv sdv
JoseLuisCahuanaRamos3
 
PDF
Designing for Tomorrow – Architecture’s Role in the Sustainability Movement
BIM Services
 
PDF
A Brief Introduction About Robert Paul Hardee
Robert Paul Hardee
 
PDF
13th International Conference of Security, Privacy and Trust Management (SPTM...
ijcisjournal
 
PDF
How to Buy Verified CashApp Accounts IN 2025
Buy Verified CashApp Accounts
 
PPTX
FSE_LLM4SE1_A Tool for In-depth Analysis of Code Execution Reasoning of Large...
cl144
 
PPTX
Artificial Intelligence jejeiejj3iriejrjifirirjdjeie
VikingsGaming2
 
PPTX
Alan Turing - life and importance for all of us now
Pedro Concejero
 
PDF
NFPA 10 - Estandar para extintores de incendios portatiles (ed.22 ENG).pdf
Oscar Orozco
 
PPTX
Electrical_Safety_EMI_EMC_Presentation.pptx
drmaneharshalid
 
PDF
LLC CM NCP1399 SIMPLIS MODEL MANUAL.PDF
ssuser1be9ce
 
PPTX
Introduction to File Transfer Protocol with commands in FTP
BeulahS2
 
PPTX
Unit_I Functional Units, Instruction Sets.pptx
logaprakash9
 
Authentication Devices in Fog-mobile Edge Computing Environments through a Wi...
ijujournal
 
template.pptxr4t5y67yrttttttttttttttttttttttttttttttttttt
SithamparanaathanPir
 
Engineering Quiz ShowEngineering Quiz Show
CalvinLabial
 
Module - 5 Machine Learning-22ISE62.pdf
Dr. Shivashankar
 
June 2025 - Top 10 Read Articles in Network Security and Its Applications
IJNSA Journal
 
Tesia Dobrydnia - An Avid Hiker And Backpacker
Tesia Dobrydnia
 
UNIT 1 - INTRODUCTION TO AI and AI tools and basic concept
gokuld13012005
 
CLIP_Internals_and_Architecture.pdf sdvsdv sdv
JoseLuisCahuanaRamos3
 
Designing for Tomorrow – Architecture’s Role in the Sustainability Movement
BIM Services
 
A Brief Introduction About Robert Paul Hardee
Robert Paul Hardee
 
13th International Conference of Security, Privacy and Trust Management (SPTM...
ijcisjournal
 
How to Buy Verified CashApp Accounts IN 2025
Buy Verified CashApp Accounts
 
FSE_LLM4SE1_A Tool for In-depth Analysis of Code Execution Reasoning of Large...
cl144
 
Artificial Intelligence jejeiejj3iriejrjifirirjdjeie
VikingsGaming2
 
Alan Turing - life and importance for all of us now
Pedro Concejero
 
NFPA 10 - Estandar para extintores de incendios portatiles (ed.22 ENG).pdf
Oscar Orozco
 
Electrical_Safety_EMI_EMC_Presentation.pptx
drmaneharshalid
 
LLC CM NCP1399 SIMPLIS MODEL MANUAL.PDF
ssuser1be9ce
 
Introduction to File Transfer Protocol with commands in FTP
BeulahS2
 
Unit_I Functional Units, Instruction Sets.pptx
logaprakash9
 

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