SlideShare a Scribd company logo
1 of 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]

More Related Content

Similar to 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
 

Similar to 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
 

More from 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
 

More from 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
 

Recently uploaded

🐬 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
 
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
 
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
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
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
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
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
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Enterprise Knowledge
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
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
 
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
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?Igalia
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
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
 
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
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsJoaquim Jorge
 
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
 
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
 
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
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 

Recently uploaded (20)

🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
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
 
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
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
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...
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
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
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
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?
 
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
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
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
 
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
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
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
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 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...
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 

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.

Editor's Notes

  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