SlideShare uma empresa Scribd logo
1 de 33
VISUAL BASIC
STARTING A NEW PROJECT
THE PROPERTIES WINDOW
COMMON FORM PROPERTIES
SCALE PROPERTIES
COLOR PROPERTIES
THE TOOLBOX
CREATING CONTROL
THE NAME PROPERTY
PROPERTIES OF COMMAND BUTTONS
SIMPLE EVENT PROCEDURE FOR COMMAND BUTTONS
ACCESS KEY
IMAGE CONTROL
TEXTBOX,LABELS,MESSAGE BOX
GRID
VISUAL BASIC
Visual Basic is a event-driven programming Language from Microsoft known for
its Component Object Model (COM) programming.
Visual Basic was derived from BASIC and enables the rapid application development
(RAD) of graphical user interface (GUI) applications, access to databases using Data
Access Objects, Remote Data Objects or ActiveX Data Objects
A programmer can create an application using the components provided by the Visual
Basic program itself.
STARTING A NEW PROJECT
Create a project
There are multiple ways to create a new project in Visual Studio 2019. When
you first open Visual Studio, the start window appears, and from there, you can
choose Create a new project.
• Open Visual Studio 2019.
• On the start window, choose Create a new project.
If the Visual Studio development environment is already open, you can create a new
project by choosing File > New > Project on the menu bar or by clicking the New
Project button on the toolbar.
FROM THE TOOLS BOX, DRAG A PICTURE BOX ONTO YOUR FORM, DRAG A BUTTON
ONTO YOUR FORM AND DRAG AN OPEN FILE DIALOG ONTO YOUR FORM.
CONTROL PROPERTIES
To edit properties, click on the object and change the values in the properties window.
Form Properties
Text: Picture Viewer
Form Border Style: Fixed Tool Window
Picture Box
Background Image Layout: Zoom
Button
Text: Select Image
ADD CODE
VISUAL BASIC IDE(INTEGRADED
DEVELOPMENT ENVIRONMENT)
The Visual Studio integrated development environment is a creative that you
can use to edit, debug, and build code, and then publish an app.
An integrated development environment (IDE) is a feature-rich program that
can be used for many aspects of software development.
Over and above the standard editor and debugger that most IDEs provide,
Visual Studio includes compilers, code completion tools, graphical designers,
and many more features to ease the software development process.
• Solution Explorer (top right) lets you view, navigate, and manage your code
files. Solution Explorer can help organize your code by grouping the files
into solutions and projects.
• The editor window (center), where you'll likely spend a majority of your
time, displays file contents. This is where you can edit code or design a user
interface such as a window with buttons and text boxes.
• The Output window (bottom center) is where Visual Studio sends
notifications such as debugging and error messages, compiler warnings,
publishing status messages, and more. Each message source has its own
tab.
• Explorer (bottom right) lets you track work and share code with others using
version control technologies.
THE PROPERTIES WINDOW
• The Properties window is used to display properties for objects selected in the two
main types of windows available in the Visual Studio integrated development
environment (IDE). These two types of windows are:
• Tool windows such as Solution Explorer, Class View, and Object browser
• Document windows containing such editors and designers as the forms designer,
XML editor, and HTML editor
Using the Properties Window
• The Properties window displays the properties of single or multiple selected items.
If multiple items are selected, the intersection of all properties for all selected
objects is displayed.
COMMON FORM PROPERTIES
• Name : It sets the name of the control, through which you can access the control’s properties and
methods.
• Appearance : It can be 0 for a flat look or 1 for a 3-D look.
• Back Color : It sets the background color on which text is displayed or graphics are drawn.
• Fore Color : It sets the foreground color
• Font : It sets the face, attribute, and size of the font used for the text on the control.
• Caption : It sets the text that is displayed on many controls that don’t accept input, for example, the text
on a Label control, the caption of a Command Button control.
• Text : It sets the text that is displayed on the controls that accept user input, for example, the TextBox
control.
• Width & Height : These properties set the control’s dimensions.
• Left & Top : These properties set the coordinates of the control’s upper-left corner, expressed in the
units of the container.
• Enabled : By default, this property’s value is True, which means that the control can get the focus.
• Visible : Set this property to False to make a control invisible.
SCALE PROPERTIES
• Width and Height Properties:The Width and Height properties of the Picture Box control are expressed in twips. If you change the
control’s coordinate system, the values of these two properties won’t change. If you resize the control on the Form by dragging
its handles with the mouse, the Width and Height properties will change value to reflect the new size of the control.
• Left “and Top Properties
• The Left and Top properties are the coordinates of the control’s upper-left comer, / and they are expressed in the container’s
coordinate system. If you change their values, the control is repositioned. They also change value if you change the
container’s coordinate system to reflect the control’s position in the new coordinate system.
• ScaleMode Property
• The ScnleMode property sets (or returns) the-control’s current coordinate system.
If you set this property to 0 (User), you must also set the ScaleWidth and ScaleHeight properties.
• ScaleWidth and ScaleHeight Properties
• These two properties are the control’s inner dimensions in units of the current coordinate system. Changing the coordinate system
doesn’tchange the size of the control, but it does change the number of units that can fit along the tW6 axes of the control.
• ScaleLeft and SealeTop Properties
• ScaleLeft and ScaleTop are the coordinates of the upper-left comer of the control in a user-defined system of
coordinates. Coordinate systems need not start at zero. Sca1eLeftis the minimum value an Xcoordinate can assume. The maximum
Xcoordinate is Sca1eLeft+ScaleWidth.
• Scale Method
• Using the Scale method is the most convenient way to set up a user-defined coordinate system.
The.coordinates 0; the upper-left comer of the control are (Xl, V, and (X2, Y2) are the coordinate of the lower-right comer.
COLOR PROPERTIES
properties of a control such as font, location, size, foreground color, background color,
MaximizeBox, MinimizeBox and etc. You can also change the properties of the object
at runtime to give special effects such as change of color, shape, animation effect and
so on
• Forecolor
• Backcolor
• Backgroundimage
• Backgroundcolor
THE TOOLBOX
• The Toolbox contains a set of controls that are used to place on a Form at design
time thereby creating the user interface area. Additional controls can be included in
the toolbox by using the Components menu item on the Project menu.
Control Description
Pointer Provides a way to move and resize the controls form
PictureBox Displays icons/bitmaps and metafiles. It displays text or acts as a visual container for other controls.
TextBox Used to display message and enter text.
Frame Serves as a visual and functional container for controls
CommandButton Used to carry out the specified action when the user chooses it.
CheckBox Displays a True/False or Yes/No option.
OptionButton OptionButton control which is a part of an option group allows the user to select only one option even it displays mulitiple choices.
ListBox Displays a list of items from which a user can select one.
ComboBox Contains a TextBox and a ListBox. This allows the user to select an ietm from the dropdown ListBox, or to type in a selection in the TextBox.
HScrollBar and VScrollBar These controls allow the user to select a value within the specified range of values
Timer Executes the timer events at specified intervals of time
DriveListBox Displays the valid disk drives and allows the user to select one of them.
DirListBox Allows the user to select the directories and paths, which are displayed.
FileListBox Displays a set of files from which a user can select the desired one.
Shape Used to add shape (rectangle, square or circle) to a Form
Line Used to draw straight line to the Form
Image used to display images such as icons, bitmaps and metafiles. But less capability than the PictureBox
Data Enables the use to connect to an existing database and display information from it.
OLE Used to link or embed an object, display and manipulate data from other windows based applications.
Label Displays a text that the user cannot modify or interact with.
CREATING CONTROL AND THE NAME
PROPERTY
• Every control has it’s properties one of the common properties of controls is name
property. Name property is the one by which the control is identified and it is
referred as the object name of that control.
• By using name property programmer can access the other properties of the controls
and methods as well at run time.
•
• Visual Basic gives default name to the controls which can be later changed by
changing it’s name property at the design time or urn time.
PROPERTIES OF COMMAND
BUTTON
• The main function of the CommandButton control is to run code when the user
clicks on it. You should keep the following points in mind when programming with
CommandButton properties:
• You should always change the Caption property of a CommandButton. The Caption
property contains the text displayed on the CommandButton. This property can be
changed at design time and runtime.
• The Cancel property is a Boolean type. It allows VB to associate the Escape key
with the CommandButton's Click event procedure. Thus if you set Cancel to True,
the Click event procedure fires when the user presses the Escape key. Cancel
buttons are usually associated the with the Escape key.
COMMON PROPERTIES OF COMMAND BUTTON
Property Description
Left The position of the left side of a control with respect
to its container
Top The position of the top of a control with respect to
its container
Height A control's height
Width A control's width
Name The string value used to refer to a control
Enabled The Boolean (True/False) value that determines
whether users can manipulate the control
Visible The Boolean (True/False) value that determines
whether users can see the control
COMMON METHODS OF VISUAL
BASIC CONTROLS
Method Use
Move Changes an object's position in response to a
code request
Drag Handles the execution of a drag-and-drop
operation by the user
SetFocus Gives focus to the object specified in the
method call
ZOrder Determines the order in which multiple objects
appear onscreen
COMMON EVENTS OF VISUAL BASIC
CONTROLS
Event Occurrence
Change The user modifies text in a combo box or text box.
Click The user clicks the primary mouse button on an object.
DblClick The user double-clicks the primary mouse button on an object.
DragDrop The user drags an object to another location.
DragOver The user drags an object over another control.
GotFocus An object receives focus.
KeyDown The user presses a keyboard key while an object has focus.
KeyPress The user presses and releases a keyboard key while an object has
focus.
KeyUp The user releases a keyboard key while an object has focus.
Event Occurrence
LostFocus An object loses focus.
MouseDown The user presses any mouse button while the mouse pointer is over an
object.
MouseMove The user moves the mouse pointer over an object.
MouseUp The user releases any mouse button while the mouse pointer is over an
object.
SIMPLE EVENT PROCEDURE FOR
COMMAND BUTTONS
• A procedure contains a series of Visual Basic statements that perform an operation
or calculate a value. An event procedure is a procedure that runs in response to an
event.
To write the event procedure for the OK command button
• 1 In Design view, right-click the object (form, report, section, or control) for which
you want to write an event procedure, in this case, the OK command button. On the
shortcut menu, click Build Event.
• Microsoft Access displays the Choose Builder dialog box.
• 2 In the list box, click Code Builder, and then click OK.
ACCESS KEY
• An access key is an underlined character in the text of a menu, menu item, or the
label of a control such as a button. With an access key, the user can "click" a button
by pressing the Alt key in combination with the predefined access key.
• For example, if a button runs a procedure to print a form, and therefore its property
is set to "Print," adding an ampersand before the letter "P" causes the letter "P" to
be underlined in the button text at run time. The user can run the command
associated with the button by pressing Alt+P.
IMAGE CONTROL
• The PictureBox control is used for displaying images on the form. The Image property of
the control allows you to set an image both at design time or at run time. Let's create a picture box by
dragging a PictureBox control from the Toolbox and dropping it on the form.
• Image
Gets or sets the image that is displayed in the control.
ImageLocation
• Gets or sets the path or the URL for the image displayed in the control.
InitialImage
• Gets or sets the image displayed in the control when the main image is loaded.
SizeMode
• Determines the size of the image to be displayed in the control. This property takes its value from the
PictureBoxSizeMode enumeration, which has values −
• Normal − the upper left corner of the image is placed at upper left part of the picture box
• StrechImage − allows stretching of the image
• AutoSize − allows resizing the picture box to the size of the image
• CenterImage − allows centering the image in the picture box
• Zoom − allows increasing or decreasing the image size to maintain the size ratio.
TEXTBOX,LABELS,MESSAGE BOX
• The Label
• The label can be used to provide instructions and guides to the users as well as to display
outputs. It is different from text box because it can only display static text, which means the user
cannot change the text.
• TextBox
• The TextBox control is for accepting input from the user as well as to display the output. It can
handle string and numeric data but not images or pictures. String in a text box can be converted
to a numeric data by using the function Val(text). The label control is only for displaying a
caption/title or to display an output.
• A message box is a special dialog box used to display a piece of information to the user. As
opposed to a regular form, the user cannot type anything in the dialog box. To support message
boxes, the Visual Basic language provides a function named MsgBox.
• To display a simple message box, you can use the MsgBox() function with the following formula:
GRID
• A grid view or a datagrid is a graphical control element that presents a tabular
view of data.
• Clicking a column header to change the sort order of the grid
• Dragging column headers to change their size and their order
• In-place editing of viewed data
• Row and column separators, and alternating row background colors
Visual Basic IDE and Controls

Mais conteúdo relacionado

Mais procurados

An introduction to microsoft office 2007 lecture
An introduction to microsoft office 2007 lectureAn introduction to microsoft office 2007 lecture
An introduction to microsoft office 2007 lectureSukh Sandhu
 
Introduction to visual basic programming
Introduction to visual basic programmingIntroduction to visual basic programming
Introduction to visual basic programmingRoger Argarin
 
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 6Jeanie Arnoco
 
Windows form application_in_vb(vb.net --3 year)
Windows form application_in_vb(vb.net --3 year)Windows form application_in_vb(vb.net --3 year)
Windows form application_in_vb(vb.net --3 year)Ankit Gupta
 
Lecture 1 introduction to vb.net
Lecture 1   introduction to vb.netLecture 1   introduction to vb.net
Lecture 1 introduction to vb.netMUKALU STEVEN
 
Presentation on visual basic 6 (vb6)
Presentation on visual basic 6 (vb6)Presentation on visual basic 6 (vb6)
Presentation on visual basic 6 (vb6)pbarasia
 
Step By Step Microsoft Power Point 2010
Step By Step Microsoft Power Point 2010Step By Step Microsoft Power Point 2010
Step By Step Microsoft Power Point 2010Baseera Hashmi
 
Microsoft PowerPoint 2013
Microsoft PowerPoint 2013Microsoft PowerPoint 2013
Microsoft PowerPoint 2013Arpee Callejo
 
Powerpoint tutorials
Powerpoint tutorials Powerpoint tutorials
Powerpoint tutorials ePowerpoint
 
Introduction to vb.net
Introduction to vb.netIntroduction to vb.net
Introduction to vb.netJaya Kumari
 
E learning excel vba programming lesson 1
E learning excel vba programming  lesson 1E learning excel vba programming  lesson 1
E learning excel vba programming lesson 1Vijay Perepa
 
introduction to visual basic PPT.pptx
introduction to visual basic PPT.pptxintroduction to visual basic PPT.pptx
introduction to visual basic PPT.pptxclassall
 
Macromedia Flash Player Practical file
Macromedia Flash Player Practical file Macromedia Flash Player Practical file
Macromedia Flash Player Practical file varun arora
 
Excel PowerPoint
Excel PowerPointExcel PowerPoint
Excel PowerPointnhumar
 
Visual basic
Visual basicVisual basic
Visual basicDharmik
 
Components of .NET Framework
Components of .NET FrameworkComponents of .NET Framework
Components of .NET FrameworkRoshith S Pai
 

Mais procurados (20)

An introduction to microsoft office 2007 lecture
An introduction to microsoft office 2007 lectureAn introduction to microsoft office 2007 lecture
An introduction to microsoft office 2007 lecture
 
Introduction to visual basic programming
Introduction to visual basic programmingIntroduction to visual basic programming
Introduction to visual basic programming
 
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
 
MS Word Basics Training
MS Word Basics TrainingMS Word Basics Training
MS Word Basics Training
 
Windows form application_in_vb(vb.net --3 year)
Windows form application_in_vb(vb.net --3 year)Windows form application_in_vb(vb.net --3 year)
Windows form application_in_vb(vb.net --3 year)
 
Lecture 1 introduction to vb.net
Lecture 1   introduction to vb.netLecture 1   introduction to vb.net
Lecture 1 introduction to vb.net
 
Presentation on visual basic 6 (vb6)
Presentation on visual basic 6 (vb6)Presentation on visual basic 6 (vb6)
Presentation on visual basic 6 (vb6)
 
Step By Step Microsoft Power Point 2010
Step By Step Microsoft Power Point 2010Step By Step Microsoft Power Point 2010
Step By Step Microsoft Power Point 2010
 
Microsoft PowerPoint 2013
Microsoft PowerPoint 2013Microsoft PowerPoint 2013
Microsoft PowerPoint 2013
 
Powerpoint tutorials
Powerpoint tutorials Powerpoint tutorials
Powerpoint tutorials
 
Visual Basic 6.0
Visual Basic 6.0Visual Basic 6.0
Visual Basic 6.0
 
Introduction to vb.net
Introduction to vb.netIntroduction to vb.net
Introduction to vb.net
 
Corel draw
Corel drawCorel draw
Corel draw
 
Microsoft Excel Tutorial
Microsoft Excel TutorialMicrosoft Excel Tutorial
Microsoft Excel Tutorial
 
E learning excel vba programming lesson 1
E learning excel vba programming  lesson 1E learning excel vba programming  lesson 1
E learning excel vba programming lesson 1
 
introduction to visual basic PPT.pptx
introduction to visual basic PPT.pptxintroduction to visual basic PPT.pptx
introduction to visual basic PPT.pptx
 
Macromedia Flash Player Practical file
Macromedia Flash Player Practical file Macromedia Flash Player Practical file
Macromedia Flash Player Practical file
 
Excel PowerPoint
Excel PowerPointExcel PowerPoint
Excel PowerPoint
 
Visual basic
Visual basicVisual basic
Visual basic
 
Components of .NET Framework
Components of .NET FrameworkComponents of .NET Framework
Components of .NET Framework
 

Semelhante a Visual Basic IDE and Controls

Semelhante a Visual Basic IDE and Controls (20)

Visual Basic IDE Intro.pdf
Visual Basic IDE Intro.pdfVisual Basic IDE Intro.pdf
Visual Basic IDE Intro.pdf
 
Visual C# 2010
Visual C# 2010Visual C# 2010
Visual C# 2010
 
Vb basic
Vb basicVb basic
Vb basic
 
Vb6.0 intro
Vb6.0 introVb6.0 intro
Vb6.0 intro
 
VB6_INTRODUCTION.ppt
VB6_INTRODUCTION.pptVB6_INTRODUCTION.ppt
VB6_INTRODUCTION.ppt
 
visual basic for the beginner
visual basic for the beginnervisual basic for the beginner
visual basic for the beginner
 
Visual basic
Visual basicVisual basic
Visual basic
 
Unit2
Unit2Unit2
Unit2
 
Introduction to visual basic 6 (1)
Introduction to visual basic 6 (1)Introduction to visual basic 6 (1)
Introduction to visual basic 6 (1)
 
COM 211 PRESENTATION.pptx
COM 211 PRESENTATION.pptxCOM 211 PRESENTATION.pptx
COM 211 PRESENTATION.pptx
 
Mca 504 dotnet_unit5
Mca 504 dotnet_unit5Mca 504 dotnet_unit5
Mca 504 dotnet_unit5
 
Grasping The LightSwitch Paradigm
Grasping The LightSwitch ParadigmGrasping The LightSwitch Paradigm
Grasping The LightSwitch Paradigm
 
Introduction to Visual Basic (Week 2)
Introduction to Visual Basic (Week 2)Introduction to Visual Basic (Week 2)
Introduction to Visual Basic (Week 2)
 
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
 
Visual basic concepts
Visual basic conceptsVisual basic concepts
Visual basic concepts
 
CheckBox In C#.pptx
CheckBox In C#.pptxCheckBox In C#.pptx
CheckBox In C#.pptx
 
Introduction of Xcode
Introduction of XcodeIntroduction of Xcode
Introduction of Xcode
 
Tugas testing
Tugas testingTugas testing
Tugas testing
 
ArduinoWorkshop2.pdf
ArduinoWorkshop2.pdfArduinoWorkshop2.pdf
ArduinoWorkshop2.pdf
 

Último

Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Igalia
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfEnterprise Knowledge
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Servicegiselly40
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...shyamraj55
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersThousandEyes
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...gurkirankumar98700
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
Google AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAGGoogle AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAGSujit Pal
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitecturePixlogix Infotech
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure servicePooja Nehwal
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024Results
 

Último (20)

Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
Google AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAGGoogle AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAG
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC Architecture
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
 

Visual Basic IDE and Controls

  • 1.
  • 2. VISUAL BASIC STARTING A NEW PROJECT THE PROPERTIES WINDOW COMMON FORM PROPERTIES SCALE PROPERTIES COLOR PROPERTIES THE TOOLBOX CREATING CONTROL THE NAME PROPERTY PROPERTIES OF COMMAND BUTTONS SIMPLE EVENT PROCEDURE FOR COMMAND BUTTONS ACCESS KEY IMAGE CONTROL TEXTBOX,LABELS,MESSAGE BOX GRID
  • 3. VISUAL BASIC Visual Basic is a event-driven programming Language from Microsoft known for its Component Object Model (COM) programming. Visual Basic was derived from BASIC and enables the rapid application development (RAD) of graphical user interface (GUI) applications, access to databases using Data Access Objects, Remote Data Objects or ActiveX Data Objects A programmer can create an application using the components provided by the Visual Basic program itself.
  • 4. STARTING A NEW PROJECT Create a project There are multiple ways to create a new project in Visual Studio 2019. When you first open Visual Studio, the start window appears, and from there, you can choose Create a new project. • Open Visual Studio 2019. • On the start window, choose Create a new project. If the Visual Studio development environment is already open, you can create a new project by choosing File > New > Project on the menu bar or by clicking the New Project button on the toolbar.
  • 5.
  • 6. FROM THE TOOLS BOX, DRAG A PICTURE BOX ONTO YOUR FORM, DRAG A BUTTON ONTO YOUR FORM AND DRAG AN OPEN FILE DIALOG ONTO YOUR FORM.
  • 8. To edit properties, click on the object and change the values in the properties window. Form Properties Text: Picture Viewer Form Border Style: Fixed Tool Window Picture Box Background Image Layout: Zoom Button Text: Select Image
  • 10. VISUAL BASIC IDE(INTEGRADED DEVELOPMENT ENVIRONMENT) The Visual Studio integrated development environment is a creative that you can use to edit, debug, and build code, and then publish an app. An integrated development environment (IDE) is a feature-rich program that can be used for many aspects of software development. Over and above the standard editor and debugger that most IDEs provide, Visual Studio includes compilers, code completion tools, graphical designers, and many more features to ease the software development process.
  • 11.
  • 12. • Solution Explorer (top right) lets you view, navigate, and manage your code files. Solution Explorer can help organize your code by grouping the files into solutions and projects. • The editor window (center), where you'll likely spend a majority of your time, displays file contents. This is where you can edit code or design a user interface such as a window with buttons and text boxes. • The Output window (bottom center) is where Visual Studio sends notifications such as debugging and error messages, compiler warnings, publishing status messages, and more. Each message source has its own tab. • Explorer (bottom right) lets you track work and share code with others using version control technologies.
  • 13. THE PROPERTIES WINDOW • The Properties window is used to display properties for objects selected in the two main types of windows available in the Visual Studio integrated development environment (IDE). These two types of windows are: • Tool windows such as Solution Explorer, Class View, and Object browser • Document windows containing such editors and designers as the forms designer, XML editor, and HTML editor Using the Properties Window • The Properties window displays the properties of single or multiple selected items. If multiple items are selected, the intersection of all properties for all selected objects is displayed.
  • 14. COMMON FORM PROPERTIES • Name : It sets the name of the control, through which you can access the control’s properties and methods. • Appearance : It can be 0 for a flat look or 1 for a 3-D look. • Back Color : It sets the background color on which text is displayed or graphics are drawn. • Fore Color : It sets the foreground color • Font : It sets the face, attribute, and size of the font used for the text on the control. • Caption : It sets the text that is displayed on many controls that don’t accept input, for example, the text on a Label control, the caption of a Command Button control. • Text : It sets the text that is displayed on the controls that accept user input, for example, the TextBox control. • Width & Height : These properties set the control’s dimensions. • Left & Top : These properties set the coordinates of the control’s upper-left corner, expressed in the units of the container. • Enabled : By default, this property’s value is True, which means that the control can get the focus. • Visible : Set this property to False to make a control invisible.
  • 15. SCALE PROPERTIES • Width and Height Properties:The Width and Height properties of the Picture Box control are expressed in twips. If you change the control’s coordinate system, the values of these two properties won’t change. If you resize the control on the Form by dragging its handles with the mouse, the Width and Height properties will change value to reflect the new size of the control. • Left “and Top Properties • The Left and Top properties are the coordinates of the control’s upper-left comer, / and they are expressed in the container’s coordinate system. If you change their values, the control is repositioned. They also change value if you change the container’s coordinate system to reflect the control’s position in the new coordinate system. • ScaleMode Property • The ScnleMode property sets (or returns) the-control’s current coordinate system. If you set this property to 0 (User), you must also set the ScaleWidth and ScaleHeight properties. • ScaleWidth and ScaleHeight Properties • These two properties are the control’s inner dimensions in units of the current coordinate system. Changing the coordinate system doesn’tchange the size of the control, but it does change the number of units that can fit along the tW6 axes of the control. • ScaleLeft and SealeTop Properties • ScaleLeft and ScaleTop are the coordinates of the upper-left comer of the control in a user-defined system of coordinates. Coordinate systems need not start at zero. Sca1eLeftis the minimum value an Xcoordinate can assume. The maximum Xcoordinate is Sca1eLeft+ScaleWidth. • Scale Method • Using the Scale method is the most convenient way to set up a user-defined coordinate system. The.coordinates 0; the upper-left comer of the control are (Xl, V, and (X2, Y2) are the coordinate of the lower-right comer.
  • 16. COLOR PROPERTIES properties of a control such as font, location, size, foreground color, background color, MaximizeBox, MinimizeBox and etc. You can also change the properties of the object at runtime to give special effects such as change of color, shape, animation effect and so on • Forecolor • Backcolor • Backgroundimage • Backgroundcolor
  • 17.
  • 18. THE TOOLBOX • The Toolbox contains a set of controls that are used to place on a Form at design time thereby creating the user interface area. Additional controls can be included in the toolbox by using the Components menu item on the Project menu. Control Description Pointer Provides a way to move and resize the controls form PictureBox Displays icons/bitmaps and metafiles. It displays text or acts as a visual container for other controls. TextBox Used to display message and enter text. Frame Serves as a visual and functional container for controls CommandButton Used to carry out the specified action when the user chooses it. CheckBox Displays a True/False or Yes/No option. OptionButton OptionButton control which is a part of an option group allows the user to select only one option even it displays mulitiple choices. ListBox Displays a list of items from which a user can select one. ComboBox Contains a TextBox and a ListBox. This allows the user to select an ietm from the dropdown ListBox, or to type in a selection in the TextBox. HScrollBar and VScrollBar These controls allow the user to select a value within the specified range of values Timer Executes the timer events at specified intervals of time DriveListBox Displays the valid disk drives and allows the user to select one of them. DirListBox Allows the user to select the directories and paths, which are displayed. FileListBox Displays a set of files from which a user can select the desired one. Shape Used to add shape (rectangle, square or circle) to a Form Line Used to draw straight line to the Form Image used to display images such as icons, bitmaps and metafiles. But less capability than the PictureBox Data Enables the use to connect to an existing database and display information from it. OLE Used to link or embed an object, display and manipulate data from other windows based applications. Label Displays a text that the user cannot modify or interact with.
  • 19.
  • 20. CREATING CONTROL AND THE NAME PROPERTY • Every control has it’s properties one of the common properties of controls is name property. Name property is the one by which the control is identified and it is referred as the object name of that control. • By using name property programmer can access the other properties of the controls and methods as well at run time. • • Visual Basic gives default name to the controls which can be later changed by changing it’s name property at the design time or urn time.
  • 21. PROPERTIES OF COMMAND BUTTON • The main function of the CommandButton control is to run code when the user clicks on it. You should keep the following points in mind when programming with CommandButton properties: • You should always change the Caption property of a CommandButton. The Caption property contains the text displayed on the CommandButton. This property can be changed at design time and runtime. • The Cancel property is a Boolean type. It allows VB to associate the Escape key with the CommandButton's Click event procedure. Thus if you set Cancel to True, the Click event procedure fires when the user presses the Escape key. Cancel buttons are usually associated the with the Escape key.
  • 22. COMMON PROPERTIES OF COMMAND BUTTON Property Description Left The position of the left side of a control with respect to its container Top The position of the top of a control with respect to its container Height A control's height Width A control's width Name The string value used to refer to a control Enabled The Boolean (True/False) value that determines whether users can manipulate the control Visible The Boolean (True/False) value that determines whether users can see the control
  • 23. COMMON METHODS OF VISUAL BASIC CONTROLS Method Use Move Changes an object's position in response to a code request Drag Handles the execution of a drag-and-drop operation by the user SetFocus Gives focus to the object specified in the method call ZOrder Determines the order in which multiple objects appear onscreen
  • 24. COMMON EVENTS OF VISUAL BASIC CONTROLS Event Occurrence Change The user modifies text in a combo box or text box. Click The user clicks the primary mouse button on an object. DblClick The user double-clicks the primary mouse button on an object. DragDrop The user drags an object to another location. DragOver The user drags an object over another control. GotFocus An object receives focus. KeyDown The user presses a keyboard key while an object has focus. KeyPress The user presses and releases a keyboard key while an object has focus. KeyUp The user releases a keyboard key while an object has focus. Event Occurrence LostFocus An object loses focus. MouseDown The user presses any mouse button while the mouse pointer is over an object. MouseMove The user moves the mouse pointer over an object. MouseUp The user releases any mouse button while the mouse pointer is over an object.
  • 25. SIMPLE EVENT PROCEDURE FOR COMMAND BUTTONS • A procedure contains a series of Visual Basic statements that perform an operation or calculate a value. An event procedure is a procedure that runs in response to an event. To write the event procedure for the OK command button • 1 In Design view, right-click the object (form, report, section, or control) for which you want to write an event procedure, in this case, the OK command button. On the shortcut menu, click Build Event. • Microsoft Access displays the Choose Builder dialog box. • 2 In the list box, click Code Builder, and then click OK.
  • 26.
  • 27.
  • 28. ACCESS KEY • An access key is an underlined character in the text of a menu, menu item, or the label of a control such as a button. With an access key, the user can "click" a button by pressing the Alt key in combination with the predefined access key. • For example, if a button runs a procedure to print a form, and therefore its property is set to "Print," adding an ampersand before the letter "P" causes the letter "P" to be underlined in the button text at run time. The user can run the command associated with the button by pressing Alt+P.
  • 29. IMAGE CONTROL • The PictureBox control is used for displaying images on the form. The Image property of the control allows you to set an image both at design time or at run time. Let's create a picture box by dragging a PictureBox control from the Toolbox and dropping it on the form. • Image Gets or sets the image that is displayed in the control. ImageLocation • Gets or sets the path or the URL for the image displayed in the control. InitialImage • Gets or sets the image displayed in the control when the main image is loaded. SizeMode • Determines the size of the image to be displayed in the control. This property takes its value from the PictureBoxSizeMode enumeration, which has values − • Normal − the upper left corner of the image is placed at upper left part of the picture box • StrechImage − allows stretching of the image • AutoSize − allows resizing the picture box to the size of the image • CenterImage − allows centering the image in the picture box • Zoom − allows increasing or decreasing the image size to maintain the size ratio.
  • 30. TEXTBOX,LABELS,MESSAGE BOX • The Label • The label can be used to provide instructions and guides to the users as well as to display outputs. It is different from text box because it can only display static text, which means the user cannot change the text. • TextBox • The TextBox control is for accepting input from the user as well as to display the output. It can handle string and numeric data but not images or pictures. String in a text box can be converted to a numeric data by using the function Val(text). The label control is only for displaying a caption/title or to display an output. • A message box is a special dialog box used to display a piece of information to the user. As opposed to a regular form, the user cannot type anything in the dialog box. To support message boxes, the Visual Basic language provides a function named MsgBox. • To display a simple message box, you can use the MsgBox() function with the following formula:
  • 31.
  • 32. GRID • A grid view or a datagrid is a graphical control element that presents a tabular view of data. • Clicking a column header to change the sort order of the grid • Dragging column headers to change their size and their order • In-place editing of viewed data • Row and column separators, and alternating row background colors