SlideShare a Scribd company logo
1 of 12
Microsoft® Small Basic Graphics Window Estimated time to complete this lesson: 1 hour
Graphics Window In this lesson, you will learn about: Statements using the GraphicsWindow object. Properties of the GraphicsWindow object. Operations of the GraphicsWindow object.
Introducing the Graphics Window  So far, you have used the text window to understand the fundamentals of programming using Small Basic. This lesson exposes you to some exciting graphic capabilities offered by Small Basic.  You start with a graphics window that you can display by using the GraphicsWindow object.
Properties of the Graphics Window You use the GraphicsWindow object to display a graphics window and draw colorful shapes in it. To display the graphics window on your screen, you use the Show operation. Let’s see how to use different properties of the GraphicsWindow object in a program… You can also define the properties of the graphics window, such as its title, height, width, and background color. output
Properties of the Graphics Window ,[object Object]
MouseY—You can use this property to find the y-position of the mouse relative to the graphics window.
PenColor—You can use this property to change the color with which shapes are drawn on the graphics window.
PenWidth—You can use thisproperty to change the width of the pen used to draw shapes on the graphics window.
BrushColor—You can use thisproperty to change the color used to fill shapes drawn on the graphics window.Certain properties of the GraphicsWindow object help you enhance the shapes your create. Some of these properties are:
Operations on the Graphics Window Some of the operations available for the GraphicsWindow object are: ,[object Object]
DrawEllipse
DrawLine

More Related Content

What's hot

E-Tech L8 Basic Webpage Creation.pptx
E-Tech L8 Basic Webpage Creation.pptxE-Tech L8 Basic Webpage Creation.pptx
E-Tech L8 Basic Webpage Creation.pptxLeah Condina
 
Empowerment Technologies - Microsoft Word
Empowerment Technologies - Microsoft WordEmpowerment Technologies - Microsoft Word
Empowerment Technologies - Microsoft WordJuan Miguel Palero
 
Advance word-processing-skills final
Advance word-processing-skills finalAdvance word-processing-skills final
Advance word-processing-skills finalmelaniebitar
 
Microsoft Publisher Overview
Microsoft Publisher OverviewMicrosoft Publisher Overview
Microsoft Publisher OverviewGregory Donaghy
 
Visual basic ppt for tutorials computer
Visual basic ppt for tutorials computerVisual basic ppt for tutorials computer
Visual basic ppt for tutorials computersimran153
 
Basic exercises for photoshop
Basic exercises for photoshopBasic exercises for photoshop
Basic exercises for photoshopPauline Torion
 
Ms publisher parts and functions
Ms publisher parts and functionsMs publisher parts and functions
Ms publisher parts and functionsLeona Rose Beltran
 
Microsoft word
Microsoft wordMicrosoft word
Microsoft wordgherryta
 
Parts of m.s word
Parts of m.s wordParts of m.s word
Parts of m.s wordJohn Lloyd
 
Session 2.2 photoshop interface
Session 2.2   photoshop interfaceSession 2.2   photoshop interface
Session 2.2 photoshop interfaceJohn Josef Jimenez
 
Advanced Presentation Skills - Empowerment Technologies
Advanced Presentation Skills - Empowerment TechnologiesAdvanced Presentation Skills - Empowerment Technologies
Advanced Presentation Skills - Empowerment TechnologiesMark Jhon Oxillo
 
Create a Brochure with Publisher 2010
Create a Brochure with Publisher 2010Create a Brochure with Publisher 2010
Create a Brochure with Publisher 2010Lisa Hartman
 
1.2 statements, properties, and operations
1.2   statements, properties, and operations1.2   statements, properties, and operations
1.2 statements, properties, and operationsallenbailey
 
Introduction to photoshop
Introduction to photoshopIntroduction to photoshop
Introduction to photoshopReymart Canuel
 
Advanced Word Processing Skills - Empowerment Technologies
Advanced Word Processing Skills - Empowerment TechnologiesAdvanced Word Processing Skills - Empowerment Technologies
Advanced Word Processing Skills - Empowerment TechnologiesMark Jhon Oxillo
 
[EMPOWERMENT TECHNOLOGIES]-ADVANCED PRESENTATION SKILLS
[EMPOWERMENT TECHNOLOGIES]-ADVANCED PRESENTATION SKILLS[EMPOWERMENT TECHNOLOGIES]-ADVANCED PRESENTATION SKILLS
[EMPOWERMENT TECHNOLOGIES]-ADVANCED PRESENTATION SKILLSJazzyNF
 

What's hot (20)

E-Tech L8 Basic Webpage Creation.pptx
E-Tech L8 Basic Webpage Creation.pptxE-Tech L8 Basic Webpage Creation.pptx
E-Tech L8 Basic Webpage Creation.pptx
 
Empowerment Technologies - Microsoft Word
Empowerment Technologies - Microsoft WordEmpowerment Technologies - Microsoft Word
Empowerment Technologies - Microsoft Word
 
Advance word-processing-skills final
Advance word-processing-skills finalAdvance word-processing-skills final
Advance word-processing-skills final
 
1.3 variables
1.3   variables1.3   variables
1.3 variables
 
Gimp
GimpGimp
Gimp
 
Microsoft Publisher Overview
Microsoft Publisher OverviewMicrosoft Publisher Overview
Microsoft Publisher Overview
 
Visual basic ppt for tutorials computer
Visual basic ppt for tutorials computerVisual basic ppt for tutorials computer
Visual basic ppt for tutorials computer
 
Basic exercises for photoshop
Basic exercises for photoshopBasic exercises for photoshop
Basic exercises for photoshop
 
Ms publisher parts and functions
Ms publisher parts and functionsMs publisher parts and functions
Ms publisher parts and functions
 
Microsoft word
Microsoft wordMicrosoft word
Microsoft word
 
Parts of m.s word
Parts of m.s wordParts of m.s word
Parts of m.s word
 
PowerPoint Tutorial
PowerPoint TutorialPowerPoint Tutorial
PowerPoint Tutorial
 
Session 2.2 photoshop interface
Session 2.2   photoshop interfaceSession 2.2   photoshop interface
Session 2.2 photoshop interface
 
Advanced Presentation Skills - Empowerment Technologies
Advanced Presentation Skills - Empowerment TechnologiesAdvanced Presentation Skills - Empowerment Technologies
Advanced Presentation Skills - Empowerment Technologies
 
Create a Brochure with Publisher 2010
Create a Brochure with Publisher 2010Create a Brochure with Publisher 2010
Create a Brochure with Publisher 2010
 
1.2 statements, properties, and operations
1.2   statements, properties, and operations1.2   statements, properties, and operations
1.2 statements, properties, and operations
 
Introduction to photoshop
Introduction to photoshopIntroduction to photoshop
Introduction to photoshop
 
PowerPoint Lesson 1: PowerPoint Basics
PowerPoint Lesson 1: PowerPoint BasicsPowerPoint Lesson 1: PowerPoint Basics
PowerPoint Lesson 1: PowerPoint Basics
 
Advanced Word Processing Skills - Empowerment Technologies
Advanced Word Processing Skills - Empowerment TechnologiesAdvanced Word Processing Skills - Empowerment Technologies
Advanced Word Processing Skills - Empowerment Technologies
 
[EMPOWERMENT TECHNOLOGIES]-ADVANCED PRESENTATION SKILLS
[EMPOWERMENT TECHNOLOGIES]-ADVANCED PRESENTATION SKILLS[EMPOWERMENT TECHNOLOGIES]-ADVANCED PRESENTATION SKILLS
[EMPOWERMENT TECHNOLOGIES]-ADVANCED PRESENTATION SKILLS
 

Viewers also liked

1.1 introduction to small basic
1.1   introduction to small basic1.1   introduction to small basic
1.1 introduction to small basicallenbailey
 
1.4 conditions and loops
1.4   conditions and loops1.4   conditions and loops
1.4 conditions and loopsallenbailey
 
2.3 exploring shapes
2.3   exploring shapes2.3   exploring shapes
2.3 exploring shapesallenbailey
 
2.2 turtle graphics
2.2   turtle graphics2.2   turtle graphics
2.2 turtle graphicsallenbailey
 
Basic logo-command
Basic logo-commandBasic logo-command
Basic logo-commanddat298
 
In-bai tap logo_01 (hsinh)
  In-bai tap logo_01 (hsinh)  In-bai tap logo_01 (hsinh)
In-bai tap logo_01 (hsinh)saobiennt
 
Msw logo application user manual for teacher
Msw logo application user manual for teacherMsw logo application user manual for teacher
Msw logo application user manual for teacherfarah510
 
Logo primitives
Logo primitivesLogo primitives
Logo primitivessshaner88
 
In-bai tap logo_02 -thu tuc (gv)
  In-bai tap logo_02 -thu tuc (gv)  In-bai tap logo_02 -thu tuc (gv)
In-bai tap logo_02 -thu tuc (gv)saobiennt
 
4.4 advanced games
4.4   advanced games4.4   advanced games
4.4 advanced gamesallenbailey
 
Unit of measurements
Unit of measurementsUnit of measurements
Unit of measurementsCarlo Mendoza
 
2.5 clock, desktop, and dictionary objects
2.5   clock, desktop, and dictionary objects2.5   clock, desktop, and dictionary objects
2.5 clock, desktop, and dictionary objectsallenbailey
 
1.5 branching and subroutines
1.5   branching and subroutines1.5   branching and subroutines
1.5 branching and subroutinesallenbailey
 
2.4 sound, program, and text objects
2.4   sound, program, and text objects2.4   sound, program, and text objects
2.4 sound, program, and text objectsallenbailey
 
Guia rápida de comandos de micromundos
Guia rápida de comandos de micromundosGuia rápida de comandos de micromundos
Guia rápida de comandos de micromundosYovany Garcia
 
Proyecto 1 en micromundos 24 mar2015
Proyecto 1 en micromundos   24 mar2015Proyecto 1 en micromundos   24 mar2015
Proyecto 1 en micromundos 24 mar2015lisvancelis
 
In-bai tap logo_02 -thu tuc (hs)
  In-bai tap logo_02 -thu tuc (hs)  In-bai tap logo_02 -thu tuc (hs)
In-bai tap logo_02 -thu tuc (hs)saobiennt
 

Viewers also liked (20)

1.1 introduction to small basic
1.1   introduction to small basic1.1   introduction to small basic
1.1 introduction to small basic
 
1.4 conditions and loops
1.4   conditions and loops1.4   conditions and loops
1.4 conditions and loops
 
2.3 exploring shapes
2.3   exploring shapes2.3   exploring shapes
2.3 exploring shapes
 
2.2 turtle graphics
2.2   turtle graphics2.2   turtle graphics
2.2 turtle graphics
 
Basic logo-command
Basic logo-commandBasic logo-command
Basic logo-command
 
In-bai tap logo_01 (hsinh)
  In-bai tap logo_01 (hsinh)  In-bai tap logo_01 (hsinh)
In-bai tap logo_01 (hsinh)
 
Msw logo
Msw logoMsw logo
Msw logo
 
Msw logo application user manual for teacher
Msw logo application user manual for teacherMsw logo application user manual for teacher
Msw logo application user manual for teacher
 
Logo primitives
Logo primitivesLogo primitives
Logo primitives
 
Geometria de las Tortugas
Geometria de las  TortugasGeometria de las  Tortugas
Geometria de las Tortugas
 
In-bai tap logo_02 -thu tuc (gv)
  In-bai tap logo_02 -thu tuc (gv)  In-bai tap logo_02 -thu tuc (gv)
In-bai tap logo_02 -thu tuc (gv)
 
Logo
LogoLogo
Logo
 
4.4 advanced games
4.4   advanced games4.4   advanced games
4.4 advanced games
 
Unit of measurements
Unit of measurementsUnit of measurements
Unit of measurements
 
2.5 clock, desktop, and dictionary objects
2.5   clock, desktop, and dictionary objects2.5   clock, desktop, and dictionary objects
2.5 clock, desktop, and dictionary objects
 
1.5 branching and subroutines
1.5   branching and subroutines1.5   branching and subroutines
1.5 branching and subroutines
 
2.4 sound, program, and text objects
2.4   sound, program, and text objects2.4   sound, program, and text objects
2.4 sound, program, and text objects
 
Guia rápida de comandos de micromundos
Guia rápida de comandos de micromundosGuia rápida de comandos de micromundos
Guia rápida de comandos de micromundos
 
Proyecto 1 en micromundos 24 mar2015
Proyecto 1 en micromundos   24 mar2015Proyecto 1 en micromundos   24 mar2015
Proyecto 1 en micromundos 24 mar2015
 
In-bai tap logo_02 -thu tuc (hs)
  In-bai tap logo_02 -thu tuc (hs)  In-bai tap logo_02 -thu tuc (hs)
In-bai tap logo_02 -thu tuc (hs)
 

Similar to 2.1 graphics window

Degrafa Overview
Degrafa OverviewDegrafa Overview
Degrafa OverviewBill White
 
How Create an Animated Web Banner with InDesign & in5
How Create an Animated Web Banner with InDesign & in5How Create an Animated Web Banner with InDesign & in5
How Create an Animated Web Banner with InDesign & in5Justin Putney
 
Better DITA Graphics for a Multi-Screen World
Better DITA Graphics for a Multi-Screen WorldBetter DITA Graphics for a Multi-Screen World
Better DITA Graphics for a Multi-Screen WorldJoe Pairman
 
Top Tips for Android UIs - Getting the Magic on Tablets
Top Tips for Android UIs - Getting the Magic on TabletsTop Tips for Android UIs - Getting the Magic on Tablets
Top Tips for Android UIs - Getting the Magic on TabletsMotorola Mobility - MOTODEV
 
Graphics on the Go
Graphics on the GoGraphics on the Go
Graphics on the GoGil Irizarry
 
Android training day 3
Android training day 3Android training day 3
Android training day 3Vivek Bhusal
 
Adobe Illustrator Tutorial en Ingles para principiantes
Adobe Illustrator Tutorial en Ingles para principiantesAdobe Illustrator Tutorial en Ingles para principiantes
Adobe Illustrator Tutorial en Ingles para principiantesneftalycontreras1408
 
Digital doodle 2perpage
Digital doodle 2perpageDigital doodle 2perpage
Digital doodle 2perpageSilvio Cazella
 
In design 2020 scripting read me
In design 2020 scripting read meIn design 2020 scripting read me
In design 2020 scripting read messuserb96862
 
Crossing the Resolution Divide
Crossing the Resolution DivideCrossing the Resolution Divide
Crossing the Resolution DivideCyrene Domogalla
 
Plan601 e session 4 demo
Plan601 e session 4 demoPlan601 e session 4 demo
Plan601 e session 4 demorkottam
 
Java Graphics
Java GraphicsJava Graphics
Java GraphicsShraddha
 
Adobe Edge Animate and Captivate 8
Adobe Edge Animate and Captivate 8Adobe Edge Animate and Captivate 8
Adobe Edge Animate and Captivate 8Kirsten Rourke
 
Lecture 5 _ Building Layouts (1).pptx
Lecture 5 _ Building Layouts (1).pptxLecture 5 _ Building Layouts (1).pptx
Lecture 5 _ Building Layouts (1).pptxssuser0ee7de1
 
Captivate 9 Features
Captivate 9 FeaturesCaptivate 9 Features
Captivate 9 FeaturesAman Vohra
 
[Android] 2D Graphics
[Android] 2D Graphics[Android] 2D Graphics
[Android] 2D GraphicsNikmesoft Ltd
 
Designing with illustrator
Designing with illustratorDesigning with illustrator
Designing with illustratorLesley Baumann
 

Similar to 2.1 graphics window (20)

Degrafa Overview
Degrafa OverviewDegrafa Overview
Degrafa Overview
 
How Create an Animated Web Banner with InDesign & in5
How Create an Animated Web Banner with InDesign & in5How Create an Animated Web Banner with InDesign & in5
How Create an Animated Web Banner with InDesign & in5
 
Better DITA Graphics for a Multi-Screen World
Better DITA Graphics for a Multi-Screen WorldBetter DITA Graphics for a Multi-Screen World
Better DITA Graphics for a Multi-Screen World
 
Top Tips for Android UIs - Getting the Magic on Tablets
Top Tips for Android UIs - Getting the Magic on TabletsTop Tips for Android UIs - Getting the Magic on Tablets
Top Tips for Android UIs - Getting the Magic on Tablets
 
Graphics on the Go
Graphics on the GoGraphics on the Go
Graphics on the Go
 
Android canvas-chapter20
Android canvas-chapter20Android canvas-chapter20
Android canvas-chapter20
 
Android training day 3
Android training day 3Android training day 3
Android training day 3
 
Adobe Illustrator Tutorial en Ingles para principiantes
Adobe Illustrator Tutorial en Ingles para principiantesAdobe Illustrator Tutorial en Ingles para principiantes
Adobe Illustrator Tutorial en Ingles para principiantes
 
Digital doodle 2perpage
Digital doodle 2perpageDigital doodle 2perpage
Digital doodle 2perpage
 
In design 2020 scripting read me
In design 2020 scripting read meIn design 2020 scripting read me
In design 2020 scripting read me
 
Crossing the Resolution Divide
Crossing the Resolution DivideCrossing the Resolution Divide
Crossing the Resolution Divide
 
Plan601 e session 4 demo
Plan601 e session 4 demoPlan601 e session 4 demo
Plan601 e session 4 demo
 
Java Graphics
Java GraphicsJava Graphics
Java Graphics
 
Adobe Edge Animate and Captivate 8
Adobe Edge Animate and Captivate 8Adobe Edge Animate and Captivate 8
Adobe Edge Animate and Captivate 8
 
Graphic Fun
Graphic FunGraphic Fun
Graphic Fun
 
Plan601E Session 4 Demo
Plan601E Session 4 DemoPlan601E Session 4 Demo
Plan601E Session 4 Demo
 
Lecture 5 _ Building Layouts (1).pptx
Lecture 5 _ Building Layouts (1).pptxLecture 5 _ Building Layouts (1).pptx
Lecture 5 _ Building Layouts (1).pptx
 
Captivate 9 Features
Captivate 9 FeaturesCaptivate 9 Features
Captivate 9 Features
 
[Android] 2D Graphics
[Android] 2D Graphics[Android] 2D Graphics
[Android] 2D Graphics
 
Designing with illustrator
Designing with illustratorDesigning with illustrator
Designing with illustrator
 

More from allenbailey

5.1 sharing code
5.1   sharing code5.1   sharing code
5.1 sharing codeallenbailey
 
4.3 collision detection
4.3   collision detection4.3   collision detection
4.3 collision detectionallenbailey
 
4.2 responding to events
4.2   responding to events4.2   responding to events
4.2 responding to eventsallenbailey
 
4.1 playing with shapes
4.1   playing with shapes4.1   playing with shapes
4.1 playing with shapesallenbailey
 
3.6 debugging aids
3.6   debugging aids3.6   debugging aids
3.6 debugging aidsallenbailey
 
3.5 the controls object
3.5   the controls object3.5   the controls object
3.5 the controls objectallenbailey
 
3.4 events and interactivity
3.4   events and interactivity3.4   events and interactivity
3.4 events and interactivityallenbailey
 
3.3 the math object
3.3   the math object3.3   the math object
3.3 the math objectallenbailey
 
3.2 stacks and arrays
3.2   stacks and arrays3.2   stacks and arrays
3.2 stacks and arraysallenbailey
 
3.1 file input and output
3.1   file input and output3.1   file input and output
3.1 file input and outputallenbailey
 
2.6 flickr, image list, and network objects
2.6   flickr, image list, and network objects2.6   flickr, image list, and network objects
2.6 flickr, image list, and network objectsallenbailey
 

More from allenbailey (11)

5.1 sharing code
5.1   sharing code5.1   sharing code
5.1 sharing code
 
4.3 collision detection
4.3   collision detection4.3   collision detection
4.3 collision detection
 
4.2 responding to events
4.2   responding to events4.2   responding to events
4.2 responding to events
 
4.1 playing with shapes
4.1   playing with shapes4.1   playing with shapes
4.1 playing with shapes
 
3.6 debugging aids
3.6   debugging aids3.6   debugging aids
3.6 debugging aids
 
3.5 the controls object
3.5   the controls object3.5   the controls object
3.5 the controls object
 
3.4 events and interactivity
3.4   events and interactivity3.4   events and interactivity
3.4 events and interactivity
 
3.3 the math object
3.3   the math object3.3   the math object
3.3 the math object
 
3.2 stacks and arrays
3.2   stacks and arrays3.2   stacks and arrays
3.2 stacks and arrays
 
3.1 file input and output
3.1   file input and output3.1   file input and output
3.1 file input and output
 
2.6 flickr, image list, and network objects
2.6   flickr, image list, and network objects2.6   flickr, image list, and network objects
2.6 flickr, image list, and network objects
 

Recently uploaded

Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebUiPathCommunity
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr BaganFwdays
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsPixlogix Infotech
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.Curtis Poe
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenHervé Boutemy
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .Alan Dix
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 3652toLead Limited
 
Ryan Mahoney - Will Artificial Intelligence Replace Real Estate Agents
Ryan Mahoney - Will Artificial Intelligence Replace Real Estate AgentsRyan Mahoney - Will Artificial Intelligence Replace Real Estate Agents
Ryan Mahoney - Will Artificial Intelligence Replace Real Estate AgentsRyan Mahoney
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024Stephanie Beckett
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxLoriGlavin3
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Mark Simos
 
Scale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL RouterScale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL RouterMydbops
 
Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...Rick Flair
 
SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICESSALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICESmohitsingh558521
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Manik S Magar
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii SoldatenkoFwdays
 
Time Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsTime Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsNathaniel Shimoni
 
unit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptxunit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptxBkGupta21
 
A Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersA Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersNicole Novielli
 

Recently uploaded (20)

Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio Web
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and Cons
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache Maven
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365
 
Ryan Mahoney - Will Artificial Intelligence Replace Real Estate Agents
Ryan Mahoney - Will Artificial Intelligence Replace Real Estate AgentsRyan Mahoney - Will Artificial Intelligence Replace Real Estate Agents
Ryan Mahoney - Will Artificial Intelligence Replace Real Estate Agents
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
 
Scale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL RouterScale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL Router
 
Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...
 
SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICESSALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko
 
Time Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsTime Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directions
 
unit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptxunit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptx
 
A Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersA Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software Developers
 

2.1 graphics window

  • 1. Microsoft® Small Basic Graphics Window Estimated time to complete this lesson: 1 hour
  • 2. Graphics Window In this lesson, you will learn about: Statements using the GraphicsWindow object. Properties of the GraphicsWindow object. Operations of the GraphicsWindow object.
  • 3. Introducing the Graphics Window So far, you have used the text window to understand the fundamentals of programming using Small Basic. This lesson exposes you to some exciting graphic capabilities offered by Small Basic. You start with a graphics window that you can display by using the GraphicsWindow object.
  • 4. Properties of the Graphics Window You use the GraphicsWindow object to display a graphics window and draw colorful shapes in it. To display the graphics window on your screen, you use the Show operation. Let’s see how to use different properties of the GraphicsWindow object in a program… You can also define the properties of the graphics window, such as its title, height, width, and background color. output
  • 5.
  • 6. MouseY—You can use this property to find the y-position of the mouse relative to the graphics window.
  • 7. PenColor—You can use this property to change the color with which shapes are drawn on the graphics window.
  • 8. PenWidth—You can use thisproperty to change the width of the pen used to draw shapes on the graphics window.
  • 9. BrushColor—You can use thisproperty to change the color used to fill shapes drawn on the graphics window.Certain properties of the GraphicsWindow object help you enhance the shapes your create. Some of these properties are:
  • 10.
  • 17. DrawResizedImageYou can use operations along with properties to create colorful shapes in your program.
  • 18. Exploring the Graphics Window Let’s explore the different properties and operations of the GraphicsWindow object by writing a program to create shapes. output
  • 19. Using Colors in the Graphics Window You can use a range of colors in the graphics window to create colorful shapes. Let’s take a look at a few colors supported by Small Basic. You can also choose from a variety of other colors such as pink, orange, yellow, purple, brown, white, and gray.
  • 20. Exploring the Graphics Window Let’s take a look at another example that explores some more properties and operations of the GraphicsWindow object. The output in this example displays a graphics window with a random-colored barcode-like design, accompanied by a secondary window—a message box.
  • 21. Exploring the Graphics Window Other operations used by the GraphicsWindow object include DrawImage and DrawResizedImage. Let’s look at an example… The DrawResizedImage operation draws the specified image onto the screen, in the size specified. The DrawImage operation draws the specified image onto the screen.
  • 22. Let’s Summarize… Congratulations! Now you know how to: Write statements relevant to the GraphicsWindow object. Use various properties of the GraphicsWindow object. Perform different operations using the GraphicsWindow object.
  • 23.
  • 24. Insert two differently colored shapes partially overlapping each other.
  • 25. Draw multiple rectangles in random colors.
  • 26. Insert a resized image at a suitable location on the screen.
  • 27. Display a message box with the message "Have a nice day!"

Editor's Notes

  1. You can choose from a variety of colors supported by Small Basic, categorized by their base hue. In your code, you can either specify the name of the color, or the hex color code.
  2. In addition drawing shapes, you can also create colorful designs in your program by using conditions and loops for your shapes. For example, take a look at the displayed example. You use a For loop to create a barcode-like design with lines. You also use the GetRandomColoroperation to randomize the color of the lines. Another useful operation for the GraphicsWindow object is ShowMessage.WithShowMessage,you can display a message box in your program. You just needto provide two parameters—the message to be displayed and the title for the message box.On clicking the Run button on the toolbar or pressing F5 on the keyboard, the program is executed. Notice that along with your graphics window, a message box is displayed. The graphics window displays the random-colored barcode-like design that we defined in the code.Code:GraphicsWindow.Title = "Graphics Window"GraphicsWindow.BackgroundColor = "White"GraphicsWindow.Width = 325GraphicsWindow.Height = 200For i = 1 To 15GraphicsWindow.PenColor = GraphicsWindow.GetRandomColor()GraphicsWindow.PenWidth = iGraphicsWindow.DrawLine(i * 20, 20, i * 20, 180)EndForGraphicsWindow.ShowMessage("Create wonderful designs and shapes in Small Basic", "Message")
  3. You can insert images in your program by using the DrawImage operation of the GraphicsWindow object. The parameters for DrawImagerequire the image name, and the x- and y-coordinates of the points where the image is to be drawn. You can also insert resized images in your program by using the DrawResizedImage operation of the GraphicsWindow object. The parameters for DrawResizedImagerequire the image name, and the x- and y-coordinates of the points where the image is to be drawn, and the width and height of the image. You also have to define the image path. If the image is stored on a Web site or server, you can specify the URL. If the image is stored on your computer, simply specify the path to the image.When you click the Run button on the toolbar or press F5 on the keyboard, the program is executed. Notice that your graphics window is displayed, along with the resized image, at the set pixel location.You can also use the SetPixeloperation to draw a pixel on the graphics window at the location specified by the x- and y-coordinates.Code:GraphicsWindow.Title = "Graphics Window"GraphicsWindow.Width = 800GraphicsWindow.Height = 600image1 = "C:Small BasicSunset.jpg"GraphicsWindow.DrawImage(image1, 0, 0)image2 = "C:Small BasicWinter.jpg"GraphicsWindow.DrawResizedImage(image2, 100, 100, 200, 200)
  4. Please Note: Ensure that the image exists at the location specified in the code.Solution:  GraphicsWindow.Show()GraphicsWindow.Title = "A Graphics Window"GraphicsWindow.Height = 640GraphicsWindow.Width = 800GraphicsWindow.BackgroundColor = "Black"GraphicsWindow.PenWidth = 10GraphicsWindow.PenColor =GraphicsWindow.PenColor = “Gold"GraphicsWindow.DrawLine(65, 100, 65, 370)GraphicsWindow.PenColor =GraphicsWindow.PenColor = “Black"GraphicsWindow.BrushColor =GraphicsWindow.BrushColor = “Cyan"GraphicsWindow.DrawEllipse(70, 250, 100, 100)GraphicsWindow.FillEllipse(70, 250, 100, 100)For i = 1 To 10GraphicsWindow.PenColor = GraphicsWindow.GetRandomColor()GraphicsWindow.PenWidth = 2GraphicsWindow.Drawrectangle(100, i * 20, 50, 10)EndForimage1 = "C:Small BasicWinter.jpg"GraphicsWindow.DrawResizedImage(image1, 200, 100, 500, 500)GraphicsWindow.ShowMessage("Have a nice day!", "Message")