The Clock Object - download.microsoft.com

The Clock Object - download.microsoft.com

Microsoft Small Basic Clock, Desktop, and Dictionary Objects Estimated time to complete this lesson: 1 hour Clock, Desktop, and Dictionary Objects In this lesson, you will learn how to: Use different properties of the Clock object. Use different properties and operations of the Desktop object.

Use different operations of the Dictionary object. The Clock Object As you program, you may encounter situations where you need to calculate time or perform certain actions based on the date and time. By using the Clock object, you can include this logic in your programs and write programs that use the

system clock. This objects properties include Date, Hour, Time, and Year. Lets explore some properties of the Clock object Date, Weekday, and Time You can get the current system date, day of the week, and time by using the Date property, the WeekDay property, and the Time property, respectively.

Lets look at an example that displays this information in the graphics window OUTPUT The Year Property You can use the Year property of the Clock object to get the current system year. Lets take an example that uses this property to calculate the users age

Click on the toolbar. Month and Day You can use the Month and the Day property of the Clock object to get the current month and current day, respectively. How about writing a program that greets you on your birthday?

OUTPUT In this example, the text window displays birthday wishes only if user specifies the same month and day as the current system month and day. Hour, Minute, and Second You can get the current hour, minute, and second of the day by using the Hour, Minute, and Second

properties of the Clock object. OUTPUT Lets combine these properties to display a digital clock in the graphics window The Desktop Object

You can set a desktop wallpaper of your choice by using the the SetWallPaper operation of the Desktop object. You can also retrieve the size of your current desktop and use the information to specify the location of objects on the screen. When you use the SetWallPaper operation, you can choose your wallpaper image from any local file, network file, or Internet URL.

The Desktop Object You can get the screen height and width of the primary desktop by using the Height and Width properties, respectively, of the Desktop object. OUTPUT Lets apply these properties to the graphics window.

The Dictionary Object The Dictionary object is a useful resource that you can include as part of your Small Basic program. You can use this object to retrieve the meaning of a specified word from the online Dictionary service. The Dictionary object has two operations

GetDefinition and GetDefinitionInFrench The Dictionary Object You can obtain the meaning of an English word by using the GetDefinition operation. For a definition in French, use the GetDefinitionInFrench operation. For example, lets use the GetDefinition operation to

find the meaning of magnanimous. Lets Summarize Congratulations! Now you know how to: Use different properties of the Clock object. Use different properties and operations of the Desktop object. Use different operations of the Dictionary object.

Show What You Know Create a program to set an alarm that plays a sound of a ringing bell and changes the wallpaper of your desktop.

Recently Viewed Presentations

  • The Internet and Its Uses - ssos.cz

    The Internet and Its Uses - ssos.cz

    Default VLAN = Přednastavená VLAN VLANs in a Converged Network Native VLAN je ta, do které patří trunk interfaces = hlavní rozhraní, v obrázku F0/1, F0/3, F0/5. Jsou to rozhraní, po kterých běží provoz všech VLAN. Native VLAN má v...
  • Growing Bigger Ideas about The Other Side

    Growing Bigger Ideas about The Other Side

    Mama wouldn't let me go out in the rain. "That's why I bought you rainy-day toys," my mama said. "You stay inside here-where it's warm and. safe and dry." But every time it rained, I looked for that girl. And...
  • Module 1: - Pmak

    Module 1: - Pmak

    Those labels must be on the external part of a shipped container and must meet the DOT requirements set forth in 49 CFR 172, Subpart E. Labels must be legible, in English, and prominently displayed. Other languages may be displayed...
  • Diapositive 1 - p8.storage.canalblog.com

    Diapositive 1 - p8.storage.canalblog.com

    peignere/ss sacriste Legrand jb 19/02/1744 5e7/268 Landais maurice Legrand marguerite 20/02/1730 5eC Négociant Gaspard olivier Legris jeanne 03/12/1764
  • Performance Evaluation

    Performance Evaluation

    ESL has lesser impact in Texas than Michigan. Fixed Effects Model provided 2 predictions. Target (what an "Average State" should achieve) Predicted (what "Your State" should achieve) RSA using Fixed Effects; hopefully OCTAE will too. ... Hargrove, Debra L Company:
  • Issue Y2K The Great War for Talent! - Tom Peters

    Issue Y2K The Great War for Talent! - Tom Peters

    Tom Peters' Re-Imagine! Business Excellence in a Disruptive Age REI.Master.20September2005.Part #2
  • Statistical analysis of fMRI data

    Statistical analysis of fMRI data

    Correlation random fields, brain connectivity, and astrophysics Keith Worsley Arnaud Charil Jason Lerch Francesco Tomaiuolo Department of Mathematics and Statistics,
  • AutoCAD Architecture 2008: Part I: Getting Started

    AutoCAD Architecture 2008: Part I: Getting Started

    Chapter 13 Globalization and Terrorism: Our Small World Frank Schmalleger PowerPoint presentation created by Ellen G. Cohn, Ph.D. Globalization Globalization A process of social homogenization by which the experiences of everyday life, marked by the diffusion of commodities and ideas,...