SlideShare une entreprise Scribd logo
1  sur  12
Microsoft® Small Basic Statements, Properties, and Operations Estimated time to complete this lesson: 1 hour
Statements, Properties, and Operations In this lesson, you will learn about: Statements in Small Basic programs. Properties of the TextWindow object. Operations of the TextWindow object.
Statements in Small Basic Programs When you give an instruction to the computer, you create a statement. You can write a program by creating just one statement or by creating two or more statements in a particular sequence. For example, you can instruct the computer to open a text window and write "Hi, Everyone" in it. To give this instruction, you write the following statement in the Editor:
Showing and Hiding the Text Window The text window is an object, and you can instruct the computer to perform operations on that object. For example, you can display the TextWindow object by using the Show operation. Similarly, you can hide theTextWindow object by using the Hide operation. output Click the               button on the Toolbar.
Properties of the TextWindow Object The TextWindow object has a specific set of properties, such as ForegroundColor, BackgroundColor, Title, CursorTop, CursorLeft, Top, and Left. You can use these properties to change how and where the TextWindow object appears. output
Operations of the TextWindow Object Let’s explore some of these operations… For the TextWindow object, you can specify the following operations: ,[object Object]
 Hide
 Write
WriteLine
 Read
 Pause
 Clear,[object Object]

Contenu connexe

Tendances

Tendances (20)

coreldrawX7_qucik_guide
coreldrawX7_qucik_guidecoreldrawX7_qucik_guide
coreldrawX7_qucik_guide
 
Powerpoint tutorials
Powerpoint tutorials Powerpoint tutorials
Powerpoint tutorials
 
Microsoft Word 2010
Microsoft Word 2010Microsoft Word 2010
Microsoft Word 2010
 
MS Publisher Training
MS Publisher TrainingMS Publisher Training
MS Publisher Training
 
PowerPoint Lesson 3: Advanced Slide Design
PowerPoint Lesson 3: Advanced Slide DesignPowerPoint Lesson 3: Advanced Slide Design
PowerPoint Lesson 3: Advanced Slide Design
 
Ms word
Ms wordMs word
Ms word
 
Drawing with paint
Drawing with paintDrawing with paint
Drawing with paint
 
Welcome to word 2016
Welcome to word 2016Welcome to word 2016
Welcome to word 2016
 
Ms excel excersices
Ms excel excersicesMs excel excersices
Ms excel excersices
 
MS Word Intermediate Training
MS Word Intermediate TrainingMS Word Intermediate Training
MS Word Intermediate Training
 
Microsoft word
Microsoft wordMicrosoft word
Microsoft word
 
Scratch Lesson 1 – Basics
Scratch Lesson 1 – BasicsScratch Lesson 1 – Basics
Scratch Lesson 1 – Basics
 
publisher.ppt
publisher.pptpublisher.ppt
publisher.ppt
 
MS Publisher.ppt
MS Publisher.pptMS Publisher.ppt
MS Publisher.ppt
 
MS Word Introduction and Tools.
MS Word Introduction and Tools.MS Word Introduction and Tools.
MS Word Introduction and Tools.
 
Microsoft office
Microsoft officeMicrosoft office
Microsoft office
 
Microsoft Office PowerPoint 2007 - Lesson 1
Microsoft Office PowerPoint 2007 - Lesson 1Microsoft Office PowerPoint 2007 - Lesson 1
Microsoft Office PowerPoint 2007 - Lesson 1
 
#2 4th ppt gr.1 microsoft paint aa
#2   4th ppt gr.1 microsoft paint  aa#2   4th ppt gr.1 microsoft paint  aa
#2 4th ppt gr.1 microsoft paint aa
 
Lesson 1 UNDERSTANDING MS WORD 2016.pptx
Lesson 1 UNDERSTANDING MS WORD 2016.pptxLesson 1 UNDERSTANDING MS WORD 2016.pptx
Lesson 1 UNDERSTANDING MS WORD 2016.pptx
 
Microsoft Office 2016
Microsoft Office 2016Microsoft Office 2016
Microsoft Office 2016
 

Similaire à 1.2 statements, properties, and operations

Getting started with the visual basic editor
Getting started with the visual basic editorGetting started with the visual basic editor
Getting started with the visual basic editorputiadetiara
 
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
 
Visual Programming
Visual ProgrammingVisual Programming
Visual ProgrammingBagzzz
 
Basics java scripts
Basics java scriptsBasics java scripts
Basics java scriptsch samaram
 
Introducing small basic
Introducing small basicIntroducing small basic
Introducing small basicAn I
 
01 Database Management (re-uploaded)
01 Database Management (re-uploaded)01 Database Management (re-uploaded)
01 Database Management (re-uploaded)bluejayjunior
 
Ppt on visual basics
Ppt on visual basicsPpt on visual basics
Ppt on visual basicsyounganand
 
1.5 branching and subroutines
1.5   branching and subroutines1.5   branching and subroutines
1.5 branching and subroutinesallenbailey
 
Introducing small basic
Introducing small basicIntroducing small basic
Introducing small basicSara Samol
 
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
 
2 Day - WPF Training by Adil Mughal
2 Day - WPF Training by Adil Mughal2 Day - WPF Training by Adil Mughal
2 Day - WPF Training by Adil MughalAdil Mughal
 
JavaScript with Syntax & Implementation
JavaScript with Syntax & ImplementationJavaScript with Syntax & Implementation
JavaScript with Syntax & ImplementationSoumen Santra
 
Basic JavaScript Tutorial
Basic JavaScript TutorialBasic JavaScript Tutorial
Basic JavaScript TutorialDHTMLExtreme
 
Lotusphere 2007 AD507 Leveraging the Power of Object Oriented Programming in ...
Lotusphere 2007 AD507 Leveraging the Power of Object Oriented Programming in ...Lotusphere 2007 AD507 Leveraging the Power of Object Oriented Programming in ...
Lotusphere 2007 AD507 Leveraging the Power of Object Oriented Programming in ...Bill Buchan
 
Plug-in Architectures
Plug-in ArchitecturesPlug-in Architectures
Plug-in Architectureselliando dias
 
3.6 debugging aids
3.6   debugging aids3.6   debugging aids
3.6 debugging aidsallenbailey
 

Similaire à 1.2 statements, properties, and operations (20)

Chapter 01
Chapter 01Chapter 01
Chapter 01
 
Getting started with the visual basic editor
Getting started with the visual basic editorGetting started with the visual basic editor
Getting started with the visual basic editor
 
Tugas testing
Tugas testingTugas testing
Tugas testing
 
Presentation on visual basic 6 (vb6)
Presentation on visual basic 6 (vb6)Presentation on visual basic 6 (vb6)
Presentation on visual basic 6 (vb6)
 
Visual Programming
Visual ProgrammingVisual Programming
Visual Programming
 
Basics java scripts
Basics java scriptsBasics java scripts
Basics java scripts
 
Introducing small basic
Introducing small basicIntroducing small basic
Introducing small basic
 
01 Database Management (re-uploaded)
01 Database Management (re-uploaded)01 Database Management (re-uploaded)
01 Database Management (re-uploaded)
 
Ppt on visual basics
Ppt on visual basicsPpt on visual basics
Ppt on visual basics
 
1.5 branching and subroutines
1.5   branching and subroutines1.5   branching and subroutines
1.5 branching and subroutines
 
Introducing small basic
Introducing small basicIntroducing small basic
Introducing small basic
 
Introducing Small Basic.pdf
Introducing Small Basic.pdfIntroducing Small Basic.pdf
Introducing Small Basic.pdf
 
Vb.net and .Net Framework
Vb.net and .Net FrameworkVb.net and .Net Framework
Vb.net and .Net Framework
 
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
 
2 Day - WPF Training by Adil Mughal
2 Day - WPF Training by Adil Mughal2 Day - WPF Training by Adil Mughal
2 Day - WPF Training by Adil Mughal
 
JavaScript with Syntax & Implementation
JavaScript with Syntax & ImplementationJavaScript with Syntax & Implementation
JavaScript with Syntax & Implementation
 
Basic JavaScript Tutorial
Basic JavaScript TutorialBasic JavaScript Tutorial
Basic JavaScript Tutorial
 
Lotusphere 2007 AD507 Leveraging the Power of Object Oriented Programming in ...
Lotusphere 2007 AD507 Leveraging the Power of Object Oriented Programming in ...Lotusphere 2007 AD507 Leveraging the Power of Object Oriented Programming in ...
Lotusphere 2007 AD507 Leveraging the Power of Object Oriented Programming in ...
 
Plug-in Architectures
Plug-in ArchitecturesPlug-in Architectures
Plug-in Architectures
 
3.6 debugging aids
3.6   debugging aids3.6   debugging aids
3.6 debugging aids
 

Plus de allenbailey

5.1 sharing code
5.1   sharing code5.1   sharing code
5.1 sharing codeallenbailey
 
4.4 advanced games
4.4   advanced games4.4   advanced games
4.4 advanced gamesallenbailey
 
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.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
 
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
 
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
 
2.1 graphics window
2.1   graphics window2.1   graphics window
2.1 graphics windowallenbailey
 
1.4 conditions and loops
1.4   conditions and loops1.4   conditions and loops
1.4 conditions and loopsallenbailey
 

Plus de allenbailey (16)

5.1 sharing code
5.1   sharing code5.1   sharing code
5.1 sharing code
 
4.4 advanced games
4.4   advanced games4.4   advanced games
4.4 advanced games
 
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.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
 
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
 
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
 
2.1 graphics window
2.1   graphics window2.1   graphics window
2.1 graphics window
 
1.4 conditions and loops
1.4   conditions and loops1.4   conditions and loops
1.4 conditions and loops
 

Dernier

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
 
Developing An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilDeveloping An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilV3cube
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Scriptwesley chun
 
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
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...DianaGray10
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...Martijn de Jong
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfsudhanshuwaghmare1
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessPixlogix Infotech
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoffsammart93
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...apidays
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?Antenna Manufacturer Coco
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...apidays
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 

Dernier (20)

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
 
Developing An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilDeveloping An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of Brazil
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
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
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your Business
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 

1.2 statements, properties, and operations

  • 1. Microsoft® Small Basic Statements, Properties, and Operations Estimated time to complete this lesson: 1 hour
  • 2. Statements, Properties, and Operations In this lesson, you will learn about: Statements in Small Basic programs. Properties of the TextWindow object. Operations of the TextWindow object.
  • 3. Statements in Small Basic Programs When you give an instruction to the computer, you create a statement. You can write a program by creating just one statement or by creating two or more statements in a particular sequence. For example, you can instruct the computer to open a text window and write "Hi, Everyone" in it. To give this instruction, you write the following statement in the Editor:
  • 4. Showing and Hiding the Text Window The text window is an object, and you can instruct the computer to perform operations on that object. For example, you can display the TextWindow object by using the Show operation. Similarly, you can hide theTextWindow object by using the Hide operation. output Click the button on the Toolbar.
  • 5. Properties of the TextWindow Object The TextWindow object has a specific set of properties, such as ForegroundColor, BackgroundColor, Title, CursorTop, CursorLeft, Top, and Left. You can use these properties to change how and where the TextWindow object appears. output
  • 6.
  • 12.
  • 13. Writing Text in the Text Window Write and WriteLine are both operations of the TextWindow object. If you use the WriteLine operation, each line of text appears on a separate line.
  • 14. Reading a Line of Text Would you like the computer to ask for your name and a friend’s name and then say "Hello" to both of you? Let’s see how to make that happen. If you use the Read operation, the computer reads and remembers what a user has typed. If you use the WriteLine operation, the computer displays the information from the user.
  • 15.
  • 16. If you use the Clear operation, the computer clears all text from the text window.Let’s write a program to better understand these operations.
  • 17. Write statements for programs in Small Basic. Change various properties of the TextWindowobject, such as its title and its location. Use various operations of the TextWindowobject, such as Show and WriteLine. Let’s Summarize… Congratulations! Now you know how to:
  • 18.
  • 19. Write a statement that makes “Small Basic Programming”appear in the title barof the text window.
  • 20. Set the top position of the cursor to 10 and left position to 20.
  • 21. Set the foreground color of the text to yellow.
  • 22. Display the sentence, “Welcome to the world of Small Basic programming.”

Notes de l'éditeur

  1. One ore more statementsmake up a program in Small Basic. The computer runs a program by reading and understanding each statement line by line.For example, this screen displays the statement: TextWindow.WriteLine("Hi, Everyone")This statement tells the computer to write the line of text, Hi, Everyone, in the text window.
  2. To write the text on separate lines, you use the WriteLine operation.Code:TextWindow.WriteLine(“Hi, everyone!”)TextWindow.WriteLine(“How are you doing?”)
  3. The Read operation of the TextWindow object takes no input. This operation instructs the computer to wait while the user types in text and then presses ENTER. After the user presses ENTER , the program reads what the user has typed and stores it in memory. You can then use the Write operation or the WriteLine operation to display the stored information.Code:TextWindow.Write(“Enter your name: “)name = TextWindow.Read()TextWindow.WriteLine(“Hello “ + name + “.”)
  4. When the program starts, the computer reads the first statement, which contains the first WriteLine operation. The computer opens the text window and writes the word “Hi” in it. The computer then reads the second statement, which contains the Pause operation. The computer pauses and waits for user input. After the user provides input, the computer reads the third statement, which contains theClear operation. The computer clears the word “Hi” from the text window. Finally, the computer reads the last statement, which contains the second WriteLine operation. The computer writesthe word “Hello” in the text window. Code:TextWindow.WriteLine(“Hi”TextWindow.Pause()TextWindow.Clear()TextWindow.WriteLine(“Hello”)
  5. Solution:TextWindow.Top = 100TextWindow.Left = 200TextWindow.Title = "Small Basic Programming"TextWindow.CursorTop = 10TextWindow.CursorLeft = 20TextWindow.ForegroundColor = "Yellow"TextWindow.WriteLine("Welcome to the world of Small Basic programming.")