SlideShare uma empresa Scribd logo
1 de 12
Microsoft® Small Basic Flickr, ImageList, and Network Objects Estimated time to complete this lesson: 1 hour
Flickr, ImageList, and Network Objects In this lesson, you will learn about: Using different operations of the ImageList object. Using different operations of the Network object. Using different operations of the Flickr object.
The Flickr Object Let’s explore each of these operations… Small Basic provides the Flickr object with two operations–  GetPictureOfMoment and GetRandomPicture. Flickr! You can access this online image-hosting Web site right from within your Small Basic program.
The Flickr Object You can use the GetPictureOfMoment operation of the Flickr object to get the URL for Flickr’s picture of the moment. You can then retrieve and display that image in your program by using the DrawImage or DrawResizedImage operations of the GraphicsWindow object.
The Flickr Object You can use the GetRandomPicture operation of the Flickr object to get the URL of a random picture, which has the same tag in Flickr as the tag you specify.  For example, if you want your desktop wallpaper to change to five different landscape photos, you can simply use the GetRandomPicture operation and specify the tag as “landscape” in the following manner. After you run the program, you see that your desktop wallpaper changes to five different landscape images every 10000 milliseconds (10 seconds).
Continuing our discussion about images…  Let’s look at another object offered by Small Basic that allows you to add specific images in your program. The ImageList Object This is the ImageList object. You can use the ImageList object to load images from a specific location and store them in memory. The ImageList object provides the following operations: LoadImage—This operation loads the stored image from a local file or the Internet into the memory of your computer. You must specify the name or the URL of the file you want to load. GetHeightOfImage—This operation retrieves the height of the stored image. When using this operation, you must specify the name of the image file. GetWidthOfImage—This operation retrieves the width of the stored image. When using this operation, you must specify the name of the image file.
The ImageList Object Let’s see how you can use the various operations of the ImageList object… Let’s look at this with an example… output The height and width of the image is retrieved by using the GetHeightOfImage and GetWidthOfImage operations.  The GraphicsWindow is then set to the same size of the image. Now, we draw the loaded image on the GraphicsWindow.
The Network Object   To retrieve the required file from the network, you can use the Network object in Small Basic. You may sometimes want to include a certain file in your Small Basic program. This file may be available on your local network or as a Web page on the Internet. Let’s learn more about these operations and how to use them… As you see, the Network object provides two operationsDownloadFile and GetWebPageContents.
The Network Object You can use the DownloadFile operation of the Network object to download a file from the network to a temporary file on your local computer. You need to specify the location of the file on the network. The output window displays the location of the downloaded file on your computer.
The Network Object You can use the GetWebPageContents operation of the Network object to get the contents of a specified Web page. In this case, the output window displays the HTML code of the Web page, “http: //www.microsoft.com/”. output
Let’s Summarize… Congratulations! Now you know how to: Use different operations of the Flickr object. Use different operations of the ImageList object. Use different operations of the Network object.
It’s Time to Apply Your Learning… Write a program that performs the following operations: ,[object Object]

Mais conteúdo relacionado

Semelhante a 2.6 flickr, image list, and network objects

3.1 file input and output
3.1   file input and output3.1   file input and output
3.1 file input and outputallenbailey
 
Grails plugin development
Grails plugin developmentGrails plugin development
Grails plugin developmentMohd Farid
 
Uploading files using selenium web driver
Uploading files using selenium web driverUploading files using selenium web driver
Uploading files using selenium web driverPankaj Biswas
 
Java script browser objects 1
Java script browser objects 1Java script browser objects 1
Java script browser objects 1H K
 
Developing an object detector solution with Azure Custom Vision .NET SDK
Developing an object detector solution with Azure Custom Vision .NET SDKDeveloping an object detector solution with Azure Custom Vision .NET SDK
Developing an object detector solution with Azure Custom Vision .NET SDKLuis Beltran
 
Android intents-3 www.j2program.blogspot.com
Android intents-3 www.j2program.blogspot.comAndroid intents-3 www.j2program.blogspot.com
Android intents-3 www.j2program.blogspot.comMohamed Rimzan
 
Chapter09 slideshow2
Chapter09 slideshow2Chapter09 slideshow2
Chapter09 slideshow2hotbyte1
 
introduction to the document object model- Dom chapter5
introduction to the document object model- Dom chapter5introduction to the document object model- Dom chapter5
introduction to the document object model- Dom chapter5FLYMAN TECHNOLOGY LIMITED
 
Spring IOC advantages and developing spring application sample
Spring IOC advantages and developing spring application sample Spring IOC advantages and developing spring application sample
Spring IOC advantages and developing spring application sample Sunil kumar Mohanty
 
Step 8_7_ 6_5_4_3_2_ 1 in one_Tutorial for Begineer on Selenium Web Driver-Te...
Step 8_7_ 6_5_4_3_2_ 1 in one_Tutorial for Begineer on Selenium Web Driver-Te...Step 8_7_ 6_5_4_3_2_ 1 in one_Tutorial for Begineer on Selenium Web Driver-Te...
Step 8_7_ 6_5_4_3_2_ 1 in one_Tutorial for Begineer on Selenium Web Driver-Te...Rashedul Islam
 
[React-Native Tutorial 10] Camera Roll / Gallery / Camera / Native Modules by...
[React-Native Tutorial 10] Camera Roll / Gallery / Camera / Native Modules by...[React-Native Tutorial 10] Camera Roll / Gallery / Camera / Native Modules by...
[React-Native Tutorial 10] Camera Roll / Gallery / Camera / Native Modules by...Kobkrit Viriyayudhakorn
 
The Future of the Web
The Future of the WebThe Future of the Web
The Future of the WebRay Nicholus
 
Introduction to jQuery
Introduction to jQueryIntroduction to jQuery
Introduction to jQueryAlek Davis
 
Make Mobile Apps Quickly
Make Mobile Apps QuicklyMake Mobile Apps Quickly
Make Mobile Apps QuicklyGil Irizarry
 
Desenvolva um game para android ou iPhone
Desenvolva um game para android ou iPhoneDesenvolva um game para android ou iPhone
Desenvolva um game para android ou iPhoneTiago Oliveira
 
Jumping Into WordPress Plugin Programming
Jumping Into WordPress Plugin ProgrammingJumping Into WordPress Plugin Programming
Jumping Into WordPress Plugin ProgrammingDougal Campbell
 
Make Cross-platform Mobile Apps Quickly - SIGGRAPH 2014
Make Cross-platform Mobile Apps Quickly - SIGGRAPH 2014Make Cross-platform Mobile Apps Quickly - SIGGRAPH 2014
Make Cross-platform Mobile Apps Quickly - SIGGRAPH 2014Gil Irizarry
 
14 asp.net session20
14 asp.net session2014 asp.net session20
14 asp.net session20Vivek chan
 

Semelhante a 2.6 flickr, image list, and network objects (20)

Web Os Hands On
Web Os Hands OnWeb Os Hands On
Web Os Hands On
 
3.1 file input and output
3.1   file input and output3.1   file input and output
3.1 file input and output
 
Grails plugin development
Grails plugin developmentGrails plugin development
Grails plugin development
 
Uploading files using selenium web driver
Uploading files using selenium web driverUploading files using selenium web driver
Uploading files using selenium web driver
 
Java script browser objects 1
Java script browser objects 1Java script browser objects 1
Java script browser objects 1
 
Developing an object detector solution with Azure Custom Vision .NET SDK
Developing an object detector solution with Azure Custom Vision .NET SDKDeveloping an object detector solution with Azure Custom Vision .NET SDK
Developing an object detector solution with Azure Custom Vision .NET SDK
 
Android intents-3 www.j2program.blogspot.com
Android intents-3 www.j2program.blogspot.comAndroid intents-3 www.j2program.blogspot.com
Android intents-3 www.j2program.blogspot.com
 
Chapter09
Chapter09Chapter09
Chapter09
 
Chapter09 slideshow2
Chapter09 slideshow2Chapter09 slideshow2
Chapter09 slideshow2
 
introduction to the document object model- Dom chapter5
introduction to the document object model- Dom chapter5introduction to the document object model- Dom chapter5
introduction to the document object model- Dom chapter5
 
Spring IOC advantages and developing spring application sample
Spring IOC advantages and developing spring application sample Spring IOC advantages and developing spring application sample
Spring IOC advantages and developing spring application sample
 
Step 8_7_ 6_5_4_3_2_ 1 in one_Tutorial for Begineer on Selenium Web Driver-Te...
Step 8_7_ 6_5_4_3_2_ 1 in one_Tutorial for Begineer on Selenium Web Driver-Te...Step 8_7_ 6_5_4_3_2_ 1 in one_Tutorial for Begineer on Selenium Web Driver-Te...
Step 8_7_ 6_5_4_3_2_ 1 in one_Tutorial for Begineer on Selenium Web Driver-Te...
 
[React-Native Tutorial 10] Camera Roll / Gallery / Camera / Native Modules by...
[React-Native Tutorial 10] Camera Roll / Gallery / Camera / Native Modules by...[React-Native Tutorial 10] Camera Roll / Gallery / Camera / Native Modules by...
[React-Native Tutorial 10] Camera Roll / Gallery / Camera / Native Modules by...
 
The Future of the Web
The Future of the WebThe Future of the Web
The Future of the Web
 
Introduction to jQuery
Introduction to jQueryIntroduction to jQuery
Introduction to jQuery
 
Make Mobile Apps Quickly
Make Mobile Apps QuicklyMake Mobile Apps Quickly
Make Mobile Apps Quickly
 
Desenvolva um game para android ou iPhone
Desenvolva um game para android ou iPhoneDesenvolva um game para android ou iPhone
Desenvolva um game para android ou iPhone
 
Jumping Into WordPress Plugin Programming
Jumping Into WordPress Plugin ProgrammingJumping Into WordPress Plugin Programming
Jumping Into WordPress Plugin Programming
 
Make Cross-platform Mobile Apps Quickly - SIGGRAPH 2014
Make Cross-platform Mobile Apps Quickly - SIGGRAPH 2014Make Cross-platform Mobile Apps Quickly - SIGGRAPH 2014
Make Cross-platform Mobile Apps Quickly - SIGGRAPH 2014
 
14 asp.net session20
14 asp.net session2014 asp.net session20
14 asp.net session20
 

Mais 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.6 debugging aids
3.6   debugging aids3.6   debugging aids
3.6 debugging aidsallenbailey
 
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
 
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.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
 
1.2 statements, properties, and operations
1.2   statements, properties, and operations1.2   statements, properties, and operations
1.2 statements, properties, and operationsallenbailey
 
1.1 introduction to small basic
1.1   introduction to small basic1.1   introduction to small basic
1.1 introduction to small basicallenbailey
 

Mais de allenbailey (15)

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.6 debugging aids
3.6   debugging aids3.6   debugging aids
3.6 debugging aids
 
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
 
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.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
 
1.2 statements, properties, and operations
1.2   statements, properties, and operations1.2   statements, properties, and operations
1.2 statements, properties, and operations
 
1.1 introduction to small basic
1.1   introduction to small basic1.1   introduction to small basic
1.1 introduction to small basic
 

Último

Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CVKhem
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc
 
Top 10 Most Downloaded Games on Play Store in 2024
Top 10 Most Downloaded Games on Play Store in 2024Top 10 Most Downloaded Games on Play Store in 2024
Top 10 Most Downloaded Games on Play Store in 2024SynarionITSolutions
 
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsTop 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsRoshan Dwivedi
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
🐬 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
 
Manulife - Insurer Innovation Award 2024
Manulife - Insurer Innovation Award 2024Manulife - Insurer Innovation Award 2024
Manulife - Insurer Innovation Award 2024The Digital Insurer
 
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
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
HTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesHTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesBoston Institute of Analytics
 
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
 
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
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024The Digital Insurer
 
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
 
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
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyKhushali Kathiriya
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MIND CTI
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUK Journal
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProduct Anonymous
 
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...Principled Technologies
 

Último (20)

Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
Top 10 Most Downloaded Games on Play Store in 2024
Top 10 Most Downloaded Games on Play Store in 2024Top 10 Most Downloaded Games on Play Store in 2024
Top 10 Most Downloaded Games on Play Store in 2024
 
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsTop 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Manulife - Insurer Innovation Award 2024
Manulife - Insurer Innovation Award 2024Manulife - Insurer Innovation Award 2024
Manulife - Insurer Innovation Award 2024
 
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
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
HTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesHTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation Strategies
 
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...
 
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
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
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
 
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...
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
 

2.6 flickr, image list, and network objects

  • 1. Microsoft® Small Basic Flickr, ImageList, and Network Objects Estimated time to complete this lesson: 1 hour
  • 2. Flickr, ImageList, and Network Objects In this lesson, you will learn about: Using different operations of the ImageList object. Using different operations of the Network object. Using different operations of the Flickr object.
  • 3. The Flickr Object Let’s explore each of these operations… Small Basic provides the Flickr object with two operations– GetPictureOfMoment and GetRandomPicture. Flickr! You can access this online image-hosting Web site right from within your Small Basic program.
  • 4. The Flickr Object You can use the GetPictureOfMoment operation of the Flickr object to get the URL for Flickr’s picture of the moment. You can then retrieve and display that image in your program by using the DrawImage or DrawResizedImage operations of the GraphicsWindow object.
  • 5. The Flickr Object You can use the GetRandomPicture operation of the Flickr object to get the URL of a random picture, which has the same tag in Flickr as the tag you specify. For example, if you want your desktop wallpaper to change to five different landscape photos, you can simply use the GetRandomPicture operation and specify the tag as “landscape” in the following manner. After you run the program, you see that your desktop wallpaper changes to five different landscape images every 10000 milliseconds (10 seconds).
  • 6. Continuing our discussion about images… Let’s look at another object offered by Small Basic that allows you to add specific images in your program. The ImageList Object This is the ImageList object. You can use the ImageList object to load images from a specific location and store them in memory. The ImageList object provides the following operations: LoadImage—This operation loads the stored image from a local file or the Internet into the memory of your computer. You must specify the name or the URL of the file you want to load. GetHeightOfImage—This operation retrieves the height of the stored image. When using this operation, you must specify the name of the image file. GetWidthOfImage—This operation retrieves the width of the stored image. When using this operation, you must specify the name of the image file.
  • 7. The ImageList Object Let’s see how you can use the various operations of the ImageList object… Let’s look at this with an example… output The height and width of the image is retrieved by using the GetHeightOfImage and GetWidthOfImage operations. The GraphicsWindow is then set to the same size of the image. Now, we draw the loaded image on the GraphicsWindow.
  • 8. The Network Object   To retrieve the required file from the network, you can use the Network object in Small Basic. You may sometimes want to include a certain file in your Small Basic program. This file may be available on your local network or as a Web page on the Internet. Let’s learn more about these operations and how to use them… As you see, the Network object provides two operationsDownloadFile and GetWebPageContents.
  • 9. The Network Object You can use the DownloadFile operation of the Network object to download a file from the network to a temporary file on your local computer. You need to specify the location of the file on the network. The output window displays the location of the downloaded file on your computer.
  • 10. The Network Object You can use the GetWebPageContents operation of the Network object to get the contents of a specified Web page. In this case, the output window displays the HTML code of the Web page, “http: //www.microsoft.com/”. output
  • 11. Let’s Summarize… Congratulations! Now you know how to: Use different operations of the Flickr object. Use different operations of the ImageList object. Use different operations of the Network object.
  • 12.
  • 13. Set the height and width of the graphics window similar to that of the images.
  • 14. Display the downloaded images in the graphics window.
  • 15. Change the image every 2000 milliseconds.

Notas do Editor

  1. Please Note: An Internet connection is required to use the Flickr object in Small Basic.
  2. Please Note: An Internet connection is required to use the Flickr object in Small Basic.Code:GraphicsWindow.BackgroundColor = "Black"Pic = Flickr.GetPictureOfMoment()GraphicsWindow.DrawResizedImage(Pic, 0, 0, 600, 400)
  3. Please Note: An Internet connection is required to use the Flickr object in Small Basic.Code:For image = 1 to 5pic = Flickr.GetRandomPicture("landscape")Desktop.SetWallPaper(pic)Program.Delay(10000)EndFor
  4. Code:FilePath = "http://www.microsoft.com/"WebPageContent = Network.GetWebPageContents(FilePath)TextWindow.WriteLine("Page Content: ")TextWindow.WriteLine(WebPageContent)
  5. Solution:While picture < 10ImagePath = Flickr.GetRandomPicture("Animals") Images = ImageList.LoadImage(ImagePath) GraphicsWindow.Height = ImageList.GetHeightOfImage(Images) GraphicsWindow.Width = ImageList.GetWidthOfImage(Images) GraphicsWindow.DrawImage(Images, 0, 0) Program.Delay(2000) picture = picture + 1EndWhile