<?xml version="1.0" encoding="utf-8"?>
<rss xmlns:atom="https://www.w3.org/2005/Atom" xmlns:sy="https://purl.org/rss/1.0/modules/syndication/" xmlns:dc="https://purl.org/dc/elements/1.1/" xmlns:content="https://purl.org/rss/1.0/modules/content/" xmlns:wfw="https://wellformedweb.org/CommentAPI/" xmlns:slash="https://purl.org/rss/1.0/modules/slash/"
  version="2.0">
  <channel>
    <title>Paul Cornell</title>
    <atom:link
      href="https://docs.microsoft.com/archive/blogs/paulcornell/feed.xml"
      rel="self"
      type="application/rss+xml" />
    <link>https://docs.microsoft.com/archive/blogs/paulcornell/feed.xml</link>
    <description>These blog postings are provided &amp;quot;AS IS&amp;quot; with no warranties, and confer no rights.</description>
    <lastBuildDate>Wed, 17 Apr 2019 04:03:27 GMT</lastBuildDate>
    <language>en-US</language>
    <sy:updatePeriod>hourly</sy:updatePeriod>
    <sy:updateFrequency>1</sy:updateFrequency>
    <item>
      <title>This blog is no longer being maintained</title>
      <link>https://docs.microsoft.com/archive/blogs/paulcornell/this-blog-is-no-longer-being-maintained</link>
      <pubDate>Fri, 21 Feb 2014 10:28:33 GMT</pubDate>
      <dc:creator><![CDATA[Paul Cornell]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/paulcornell/2014/02/21/this-blog-is-no-longer-being-maintained/</guid>
      <description><![CDATA[I've decided not to maintain this blog anymore. This means that I won't be adding any new posts nor...]]></description>
      <content:encoded><![CDATA[<p>I've decided not to maintain this blog anymore. This means that I won't be adding any new posts nor approving or responding to any comments. I do plan to leave all of my old posts visible for those that find them of value.</p>
<p>Thanks for your support over the years, and I wish you all happy coding!</p>
<p>--Paul</p>]]></content:encoded>
    </item>
    <item>
      <title>Small Basic #19: Syntax Cheat Sheet</title>
      <link>https://docs.microsoft.com/archive/blogs/paulcornell/small-basic-19-syntax-cheat-sheet</link>
      <pubDate>Fri, 02 Apr 2010 15:25:00 GMT</pubDate>
      <dc:creator><![CDATA[Paul Cornell]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/paulcornell/2010/04/02/small-basic-19-syntax-cheat-sheet/</guid>
      <description><![CDATA[Here's my list of how to create and access things in Small Basic. I use this when I need to jog my...]]></description>
      <content:encoded><![CDATA[<FONT size=2 face=Verdana>
<P>Here's my list of how to create and access things in Small Basic. I use this when I need to jog my memory but&nbsp;don't want to search through the Introducing Small Basic guide.</P>
<P><STRONG><U><EM>Create</EM></U></STRONG></P>
<P>Array: </P>
<BLOCKQUOTE><PRE><CODE><P>myArray[1] = "myString"<BR>TextWindow.WriteLine(Array.GetItemCount(myArray))</P></CODE></PRE></BLOCKQUOTE>
<P>Directory:</P>
<BLOCKQUOTE><PRE><CODE><P>File.CreateDirectory("C:\temp\myTempDir")</P></CODE></PRE></BLOCKQUOTE>
<P>Ellipse:</P>
<BLOCKQUOTE><PRE><CODE><P>GraphicsWindow.DrawEllipse(10, 15, 75, 25)</CODE></P></PRE></BLOCKQUOTE>
<BLOCKQUOTE><PRE><CODE><P>' Or...</CODE></P></PRE></BLOCKQUOTE>
<BLOCKQUOTE><PRE><CODE><P>myEllipse = Shapes.AddEllipse(100, 50)</CODE></P></PRE></BLOCKQUOTE>
<P>Flickr image:</P>
<BLOCKQUOTE><PRE><CODE><P>GraphicsWindow.DrawImage(Flickr.GetPictureOfMoment(), 0, 0)</CODE>
</P></PRE></BLOCKQUOTE>
<P>For statement:<BR></P>
<BLOCKQUOTE><PRE><CODE><P>For i = 1 To 10<BR>&nbsp; &nbsp;&nbsp;TextWindow.WriteLine(i)<BR>EndFor</CODE></P></PRE></BLOCKQUOTE>
<P>If/Then statement:<BR></P>
<BLOCKQUOTE><PRE><CODE><P>If Clock.Year = 2010 Then<BR>&nbsp; &nbsp;&nbsp;TextWindow.WriteLine("2010")<BR>Else<BR>&nbsp; &nbsp;&nbsp;TextWindow.WriteLine("Not 2010")&nbsp; <BR>EndIf&nbsp;</CODE></P></PRE></BLOCKQUOTE>
<P>Image:</P>
<BLOCKQUOTE><PRE><CODE><P>myImage = Shapes.AddImage(ImageList.LoadImage("<A href="https://www.microsoft.com/about/images/home_blue.jpg" mce_href="https://www.microsoft.com/about/images/home_blue.jpg">https://www.microsoft.com/about/images/home_blue.jpg</A>"))</CODE></P></PRE></BLOCKQUOTE>
<P>Label:</P>
<BLOCKQUOTE><PRE><CODE><P>Goto myLabel</CODE></P></PRE></BLOCKQUOTE>
<BLOCKQUOTE><PRE><CODE><P>myLabel:<BR>&nbsp;&nbsp;&nbsp;&nbsp;TextWindow.WriteLine("Hello, World!")</CODE></P></PRE></BLOCKQUOTE>
<P>Line:<BR></P>
<BLOCKQUOTE><PRE><CODE><P>GraphicsWindow.DrawLine(10, 20, 100, 50)</CODE></P></PRE></BLOCKQUOTE>
<BLOCKQUOTE><PRE><CODE><P>' Or...</CODE></P></PRE></BLOCKQUOTE>
<BLOCKQUOTE><PRE><CODE><P>myLine = Shapes.AddLine(15, 20, 40, 65)&nbsp;</CODE></P></PRE></BLOCKQUOTE>
<P>Rectangle:</P>
<BLOCKQUOTE><PRE><CODE><P>GraphicsWindow.DrawRectangle(5, 15, 80, 35)</CODE></P></PRE></BLOCKQUOTE>
<BLOCKQUOTE><PRE><CODE><P>' Or...<BR>&nbsp;<BR>myRectangle = Shapes.AddRectangle(50, 35)</CODE></P></PRE></BLOCKQUOTE>
<P>Shape:<BR></P>
<BLOCKQUOTE><PRE><CODE><P>myEllipse = Shapes.AddEllipse(100, 50)</CODE></P></PRE></BLOCKQUOTE>
<P>Stack:<BR></P>
<BLOCKQUOTE><PRE><CODE><P>Stack.PushValue("myStack", "myValue")<BR>TextWindow.WriteLine(Stack.PopValue("myStack"))</CODE></P></PRE></BLOCKQUOTE>
<P>Subroutine:<BR></P>
<BLOCKQUOTE><PRE><CODE><P>mySub()</CODE></P></PRE></BLOCKQUOTE>
<BLOCKQUOTE><PRE><CODE><P>Sub mySub<BR>&nbsp; &nbsp;&nbsp;TextWindow.WriteLine("Hello, World!")<BR>EndSub</CODE></P></PRE></BLOCKQUOTE>
<P>Triangle:<BR></P>
<BLOCKQUOTE><PRE><CODE><P>GraphicsWindow.DrawTriangle(10, 15, 50, 100, 75, 25)</CODE></P></PRE></BLOCKQUOTE>
<BLOCKQUOTE><PRE><CODE><P>' Or...<BR>&nbsp;<BR>myTriangle = Shapes.AddTriangle(30, 10, 100, 75, 145, 35)</CODE></P></PRE></BLOCKQUOTE>
<P><EM><U>Access</U></EM></P>
<P>Clock functions: <BR></P>
<BLOCKQUOTE><PRE><CODE><P>TextWindow.WriteLine(Clock.Date)</CODE>
</P></PRE></BLOCKQUOTE>
<P>Desktop:<BR></P>
<BLOCKQUOTE><PRE><CODE><P>TextWindow.WriteLine(Desktop.Height)</CODE></P></PRE></BLOCKQUOTE>
<P>Dictionary:<BR></P>
<BLOCKQUOTE><PRE><CODE><P>TextWindow.WriteLine(Dictionary.GetDefinition("banana"))</CODE></P></PRE></BLOCKQUOTE>
<P>File functions:<BR></P>
<BLOCKQUOTE><PRE><CODE><P>TextWindow.WriteLine(File.GetTemporaryFilePath())</CODE></P></PRE></BLOCKQUOTE>
<P>Graphics window:<BR></P>
<BLOCKQUOTE><PRE><CODE><P>GraphicsWindow.DrawBoundText(20, 10, 80, "Hello, World!")</CODE></P></PRE></BLOCKQUOTE>
<P>Image:<BR></P>
<BLOCKQUOTE><PRE><CODE><P>GraphicsWindow.DrawImage(ImageList.LoadImage("<A href="https://www.microsoft.com/about/images/home_blue.jpg" mce_href="https://www.microsoft.com/about/images/home_blue.jpg">https://www.microsoft.com/about/images/home_blue.jpg</A>"), 0, 0)</CODE></P></PRE></BLOCKQUOTE>
<P>Image list:<BR></P>
<BLOCKQUOTE><PRE><CODE><P>TextWindow.WriteLine(ImageList.GetHeightOfImage(ImageList.LoadImage("<A href="https://www.microsoft.com/about/images/home_blue.jpg" mce_href="https://www.microsoft.com/about/images/home_blue.jpg">https://www.microsoft.com/about/images/home_blue.jpg</A>")))</CODE></P></PRE></BLOCKQUOTE>
<P>Math functions:<BR></P>
<BLOCKQUOTE><PRE><CODE><P>TextWindow.WriteLine(Math.SquareRoot(25))</CODE></P></PRE></BLOCKQUOTE>
<P>Mouse:<BR></P>
<BLOCKQUOTE><PRE><CODE><P>GraphicsWindow.MouseDown = OnMouseDown</CODE></P></PRE></BLOCKQUOTE>
<BLOCKQUOTE><PRE><CODE><P>Sub OnMouseDown<BR>&nbsp; &nbsp;&nbsp;If Mouse.IsLeftButtonDown Then<BR>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; GraphicsWindow.Title = "Left button pressed"<BR>&nbsp; &nbsp;&nbsp;Else&nbsp; <BR>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; GraphicsWindow.Title = "Left button not pressed"<BR>&nbsp; &nbsp;&nbsp;EndIf <BR>EndSub</CODE></P></PRE></BLOCKQUOTE>
<P>Network functions:<BR></P>
<BLOCKQUOTE><PRE><CODE><P>TextWindow.WriteLine(Network.GetWebPageContents("<A href="https://www.microsoft.com/" mce_href="https://www.microsoft.com/">https://www.microsoft.com/</A>"))</CODE></P></PRE></BLOCKQUOTE>
<P>Program functions:<BR></P>
<BLOCKQUOTE><PRE><CODE><P>TextWindow.WriteLine(Program.Directory)</CODE></P></PRE></BLOCKQUOTE>
<P>Sound functions:<BR></P>
<BLOCKQUOTE><PRE><CODE><P>Sound.PlayBellRingAndWait()</CODE></P></PRE></BLOCKQUOTE>
<P>Stack:<BR></P>
<BLOCKQUOTE><PRE><CODE><P>Stack.PushValue("myStack", "myValue")<BR>TextWindow.WriteLine(Stack.PopValue("myStack"))</CODE></P></PRE></BLOCKQUOTE>
<P>Text functions:<BR></P>
<BLOCKQUOTE><PRE><CODE><P>TextWindow.WriteLine(Text.GetLength("myText"))</CODE></P></PRE></BLOCKQUOTE>
<P>Text window:</P>
<BLOCKQUOTE><PRE><CODE><P>TextWindow.WriteLine("Hello, World!")</CODE></P></PRE></BLOCKQUOTE>
<P>Timer:</P>
<BLOCKQUOTE><PRE><CODE><P>Timer.Tick = OnTick<BR>Timer.Interval = 5000</CODE></P></PRE><PRE><CODE>Sub OnTick<BR>&nbsp;&nbsp;&nbsp; TextWindow.WriteLine(Clock.Time)&nbsp; <BR>EndSub</CODE></PRE></BLOCKQUOTE>
<P>Turtle:</P>
<BLOCKQUOTE><PRE><CODE><P>Turtle.Move(100)&nbsp;</CODE></P>
</PRE></BLOCKQUOTE></FONT>]]></content:encoded>
    </item>
    <item>
      <title>Day/Week/Month Time Management System</title>
      <link>https://docs.microsoft.com/archive/blogs/paulcornell/dayweekmonth-time-management-system</link>
      <pubDate>Thu, 11 Feb 2010 14:04:00 GMT</pubDate>
      <dc:creator><![CDATA[Paul Cornell]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/paulcornell/2010/02/11/dayweekmonth-time-management-system/</guid>
      <description><![CDATA[Mark Forster, creator of the popular AutoFocus time management system, has come up with a new...]]></description>
      <content:encoded><![CDATA[<FONT size=2 face=Verdana>
<P><A href="https://www.markforster.net/" mce_href="https://www.markforster.net">Mark Forster</A>, creator of the popular <A href="https://www.markforster.net/autofocus-index" mce_href="https://www.markforster.net/autofocus-index">AutoFocus</A> time management system, has come up with a new version which he is currently calling the "Day/Week/Month" (or "DWM") time management system. (Until now, he had been calling it "DIT2/AF5," which stood for "Do It Tomorrow 2/AutoFocus 5.")</P>
<P><A href="https://www.markforster.net/blog/2010/2/1/dit2-af5-who-cares-what-its-called-this-is-what-im-working-o.html" mce_href="https://www.markforster.net/blog/2010/2/1/dit2-af5-who-cares-what-its-called-this-is-what-im-working-o.html">DWM</A>&nbsp;is a deceptively simple yet extremely powerful method for managing your time. To get started, if you prefer a paper-based implementation, a one-page-per-day diary format seems to work best. If however you&nbsp;prefer an electronic implementation, at minimum a way to sort list items works best (for example, Microsoft Office Excel or Microsoft Office Outlook Tasks). </P>
<P>Here's how it works:</P>
<OL>
<LI>For each new incoming task, set the task's due date to be one calendar month from today's date. For example, if today is February 11th, make the task due on March 11th.</LI>
<LI>Work on undone tasks, in any order you wish. When you finish working on a task, draw a line through it.&nbsp;</LI>
<LI>If you start working on a task and don't finish it, change the task's due date to one calendar week from today. For example, if today is February 11th, make the task due on February 18th.</LI>
<LI>All tasks which are due earlier than today's date are expired. Draw a line through these tasks. They are dead and gone. </LI>
<LI>For a task with a firm due date, set the task's due date to that date. </LI>
<LI>If you're on vacation or otherwise unable to work on tasks, when you return, push out the tasks' due dates the number of days that you were gone. For example, if you are&nbsp;unable to work on tasks during February 13th - 14th, push out all of your&nbsp;tasks' due dates by two days.&nbsp; </LI>
<LI>For paper-based implementations, write in the date at the top of each page. To move a task, just re-write it on the new page and cross off the old task. If you have to push out some tasks' due dates due to absences, just cross off the old due dates and write in the new due dates at the tops of the affected pages.&nbsp; </LI>
<LI>For electronic implementations, in Excel you could use a column for due dates and sort them that way, or for Outlook you could use the <STRONG>Due Date</STRONG> field and sort them that way. </LI></OL></FONT>]]></content:encoded>
    </item>
    <item>
      <title>Visual Studio 2010 and .NET Framework 4 Release Candidates are Here!</title>
      <link>https://docs.microsoft.com/archive/blogs/paulcornell/visual-studio-2010-and-net-framework-4-release-candidates-are-here</link>
      <pubDate>Tue, 09 Feb 2010 08:52:00 GMT</pubDate>
      <dc:creator><![CDATA[Paul Cornell]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/paulcornell/2010/02/09/visual-studio-2010-and-net-framework-4-release-candidates-are-here/</guid>
      <description><![CDATA[Get more information and download them here. ]]></description>
      <content:encoded><![CDATA[<FONT size=2 face=verdana>Get more information and download them <A href="https://msdn.microsoft.com/en-us/vstudio/dd582936.aspx" mce_href="https://msdn.microsoft.com/en-us/vstudio/dd582936.aspx">here</A>.</FONT> ]]></content:encoded>
    </item>
    <item>
      <title>Small Basic v0.8 is Here!</title>
      <link>https://docs.microsoft.com/archive/blogs/paulcornell/small-basic-v0-8-is-here</link>
      <pubDate>Mon, 08 Feb 2010 09:32:00 GMT</pubDate>
      <dc:creator><![CDATA[Paul Cornell]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/paulcornell/2010/02/08/small-basic-v0-8-is-here/</guid>
      <description><![CDATA[From the Microsoft Small Basic blog:
The Small Basic v0.8&nbsp;release features:

Addition of...]]></description>
      <content:encoded><![CDATA[<FONT size=2 face=Verdana>
<P>From the <A href="https://blogs.msdn.com/smallbasic/" mce_href="https://blogs.msdn.com/smallbasic/">Microsoft Small Basic blog</A>:</P>
<P>The Small Basic v0.8&nbsp;release features:</P>
<UL>
<LI>Addition of details about your published programs.</LI>
<LI>Rating system for programs published online.</LI>
<LI>Rich formatting based copy (useful for printing Small Basic programs).</LI>
<LI>Keyword help in Intellisense plus code samples.</LI>
<LI>Performance improvements in the Library APIs.</LI>
<LI>In addition, we have localized Small Basic in three new languages, Chinese Traditional, Japanese and Portuguese. </LI></UL>
<P>The coolest feature in this release is the Silverlight player for Small Basic programs. Now you can run Small Basic programs on your browser without having to install the IDE.</P>
<P>For more information, go <A href="https://blogs.msdn.com/smallbasic/archive/2010/02/05/small-basic-v0-8.aspx" mce_href="https://blogs.msdn.com/smallbasic/archive/2010/02/05/small-basic-v0-8.aspx">here</A>. <BR></P></FONT>]]></content:encoded>
    </item>
    <item>
      <title>Small Basic #18: Digital Clock</title>
      <link>https://docs.microsoft.com/archive/blogs/paulcornell/small-basic-18-digital-clock</link>
      <pubDate>Thu, 07 Jan 2010 14:22:00 GMT</pubDate>
      <dc:creator><![CDATA[Paul Cornell]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/paulcornell/2010/01/07/small-basic-18-digital-clock/</guid>
      <description><![CDATA[I created a digital clock&nbsp;to demonstrate the Microsoft Small Basic Clock object.&nbsp;
You...]]></description>
      <content:encoded><![CDATA[<FONT size=2 face=Verdana>
<P>I created a digital clock&nbsp;to demonstrate the Microsoft Small Basic <STRONG>Clock </STRONG>object.&nbsp;</P>
<P>You can do any of the following to experiment with the&nbsp;clock and its underlying code:</P>
<UL>
<LI>If you&nbsp;want to see&nbsp;the clock on your computer and you have Small Basic, click <STRONG>Import</STRONG>,&nbsp;type&nbsp;<STRONG>DHC348</STRONG>, click <STRONG>OK</STRONG>, and click <STRONG>Run</STRONG>.</LI>
<LI>If you don't have Small Basic but you want&nbsp;see&nbsp;the clock, go to <A href="https://smallbasic.com/run/?programID=DHC348" mce_href="https://smallbasic.com/run/?programID=DHC348">https://smallbasic.com/run/?programID=DHC348</A>. &nbsp;</LI>
<LI>If you don't have Small Basic but&nbsp;you&nbsp;want to look at the code, go to <A href="https://smallbasic.com/program/?DHC348" mce_href="https://smallbasic.com/program/?DHC348">https://smallbasic.com/program/?DHC348</A>.&nbsp;</LI></UL></FONT>]]></content:encoded>
    </item>
    <item>
      <title>Small Basic #17: Silverlight-Based Small Basic Program Runner</title>
      <link>https://docs.microsoft.com/archive/blogs/paulcornell/small-basic-17-silverlight-based-small-basic-program-runner</link>
      <pubDate>Thu, 07 Jan 2010 11:32:00 GMT</pubDate>
      <dc:creator><![CDATA[Paul Cornell]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/paulcornell/2010/01/07/small-basic-17-silverlight-based-small-basic-program-runner/</guid>
      <description><![CDATA[You can now run&nbsp;Microsoft Small Basic programs in a Microsoft Silverlight-based viewer from a...]]></description>
      <content:encoded><![CDATA[<FONT size=2 face=Verdana>
<P>You can now run&nbsp;Microsoft Small Basic programs in a Microsoft Silverlight-based viewer from a supported web browser. Here's how to do it:</P>
<OL>
<LI>If you want to run your own Small Basic program and you have not yet published&nbsp;it, from the Small Basic user interface, open the code that you want to publish, and then click <STRONG>Publish</STRONG>. Then write down the program ID that appears. </LI>
<LI>If you want to run a Small Basic program published by someone else, you must already know that program's ID.</LI>
<LI>Open your web browser and browse to the following URL: <A href="https://smallbasic.com/run/?programID=" mce_href="https://smallbasic.com/run/?programID=">https://smallbasic.com/run/?programID=</A> followed by the&nbsp;program ID; for example <A href="https://smallbasic.com/run/?programID=TPK457" mce_href="https://smallbasic.com/run/?programID=TPK457">https://smallbasic.com/run/?programID=TPK457</A>, <A href="https://smallbasic.com/run/?programID=TETRIS" mce_href="https://smallbasic.com/run/?programID=TETRIS">https://smallbasic.com/run/?programID=TETRIS</A>, or <A href="https://smallbasic.com/run/?programID=STARGATES" mce_href="https://smallbasic.com/run/?programID=STARGATES">https://smallbasic.com/run/?programID=STARGATES</A>. </LI></OL>
<P>Note that to interact with a running program, you must click inside of the viewer window, and then the program will recognize your key presses, mouse clicks, and so on. </P>
<P>Note that right now the viewer only appears to support programs that use the <STRONG>GraphicsWindow</STRONG> object. Programs&nbsp;that use other user interface constructs, such as the <STRONG>TextWindow</STRONG> object, don't appear to be supported as&nbsp;they currently display&nbsp;errors for me.</P></FONT>]]></content:encoded>
    </item>
    <item>
      <title>Small Basic #16: Downloadable Code Examples (So Far)</title>
      <link>https://docs.microsoft.com/archive/blogs/paulcornell/small-basic-16-downloadable-code-examples-so-far</link>
      <pubDate>Mon, 04 Jan 2010 15:38:00 GMT</pubDate>
      <dc:creator><![CDATA[Paul Cornell]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/paulcornell/2010/01/04/small-basic-16-downloadable-code-examples-so-far/</guid>
      <description><![CDATA[Here are the Microsoft Small Basic code examples that I've created so far. If you have Small...]]></description>
      <content:encoded><![CDATA[<FONT size=2 face=Verdana>
<P>Here are the Microsoft Small Basic code examples that I've created so far. If you have Small Basic, you can import them by using the ID numbers below, or you simply click the hyperlinks to display the code in your web browser:&nbsp;</P>
<UL>
<LI>Arrays: <STRONG>BTD771</STRONG>, <A href="https://smallbasic.com/program/?BTD771" mce_href="https://smallbasic.com/program/?BTD771">https://smallbasic.com/program/?BTD771</A></LI>
<LI>Basic Shape Movement with Mouse: <STRONG>VDJ792</STRONG>, <A href="https://smallbasic.com/program/?VDJ792" mce_href="https://smallbasic.com/program/?VDJ792">https://smallbasic.com/program/?VDJ792</A></LI>
<LI>Clock: <STRONG>BJF410</STRONG>, <A href="https://smallbasic.com/program/?BJF410" mce_href="https://smallbasic.com/program/?BJF410">https://smallbasic.com/program/?BJF410</A></LI>
<LI>Desktop: <STRONG>CQK329</STRONG>, <A href="https://smallbasic.com/program/?CQK329" mce_href="https://smallbasic.com/program/?CQK329">https://smallbasic.com/program/?CQK329</A></LI>
<LI>Dictionary:<STRONG> FMG125</STRONG>, <A href="https://smallbasic.com/program/?FMG125" mce_href="https://smallbasic.com/program/?FMG125">https://smallbasic.com/program/?FMG125</A></LI>
<LI>Draw "Hi!": <STRONG>KXL619</STRONG>, <A href="https://smallbasic.com/program/?KXL619">https://smallbasic.com/program/?KXL619</A></LI>
<LI>File Input and Output: <STRONG>HDF235</STRONG>, <A href="https://smallbasic.com/program/?HDF235">https://smallbasic.com/program/?HDF235</A></LI>
<LI>Flickr: <STRONG>CDK203</STRONG>, <A href="https://smallbasic.com/program/?CDK203">https://smallbasic.com/program/?CDK203</A></LI>
<LI>Graphics Window: <STRONG>GLT000</STRONG>, <A href="https://smallbasic.com/program/?GLT000">https://smallbasic.com/program/?GLT000</A></LI>
<LI>Image List: <STRONG>HVK076</STRONG>, <A href="https://smallbasic.com/program/?HVK076">https://smallbasic.com/program/?HVK076</A></LI>
<LI>Keywords: <STRONG>XNL147</STRONG>, <A href="https://smallbasic.com/program/?XNL147">https://smallbasic.com/program/?XNL147</A></LI>
<LI>Math Functions: <STRONG>BQG495</STRONG>, <A href="https://smallbasic.com/program/?BQG495">https://smallbasic.com/program/?BQG495</A>&nbsp;</LI>
<LI>Math Guessing Game: <STRONG>XLD240</STRONG>, <A href="https://smallbasic.com/program/?XLD240">https://smallbasic.com/program/?XLD240</A></LI>
<LI>Mouse and Keyboard Input: <STRONG>QXJ907</STRONG>, <A href="https://smallbasic.com/program/?QXJ907">https://smallbasic.com/program/?QXJ907</A></LI>
<LI>Mouse Events: <STRONG>DJD823</STRONG>, <A href="https://smallbasic.com/program/?DJD823">https://smallbasic.com/program/?DJD823</A></LI>
<LI>Network Operations: <STRONG>CTR549</STRONG>, <A href="https://smallbasic.com/program/?CTR549">https://smallbasic.com/program/?CTR549</A></LI>
<LI>Program Operations: <STRONG>MBD550</STRONG>, <A href="https://smallbasic.com/program/?MBD550">https://smallbasic.com/program/?MBD550</A></LI>
<LI>Shapes: <STRONG>MTF058</STRONG>, <A href="https://smallbasic.com/program/?MTF058">https://smallbasic.com/program/?MTF058</A></LI>
<LI>Sounds: <STRONG>MXG933</STRONG>, <A href="https://smallbasic.com/program/?MXG933">https://smallbasic.com/program/?MXG933</A></LI>
<LI>Stack Operations: <STRONG>LXW659</STRONG>, <A href="https://smallbasic.com/program/?LXW659">https://smallbasic.com/program/?LXW659</A></LI>
<LI>Subroutines: <STRONG>DDL952</STRONG>, <A href="https://smallbasic.com/program/?DDL952">https://smallbasic.com/program/?DDL952</A></LI>
<LI>Text Operations: <STRONG>VVW227</STRONG>, <A href="https://smallbasic.com/program/?VVW227">https://smallbasic.com/program/?VVW227</A></LI>
<LI>Text Window Operations: <STRONG>QQV366</STRONG>, <A href="https://smallbasic.com/program/?QQV366">https://smallbasic.com/program/?QQV366</A></LI>
<LI>Trigonometric Functions: <STRONG>CLN862</STRONG>, <A href="https://smallbasic.com/program/?CLN862">https://smallbasic.com/program/?CLN862</A></LI>
<LI>Turtle Says "Hi!": <STRONG>TPK457</STRONG>, <A href="https://smallbasic.com/program/?TPK457">https://smallbasic.com/program/?TPK457</A></FONT></LI></UL>]]></content:encoded>
    </item>
    <item>
      <title>Small Basic #15: The Turtle</title>
      <link>https://docs.microsoft.com/archive/blogs/paulcornell/small-basic-15-the-turtle</link>
      <pubDate>Wed, 30 Dec 2009 15:21:00 GMT</pubDate>
      <dc:creator><![CDATA[Paul Cornell]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/paulcornell/2009/12/30/small-basic-15-the-turtle/</guid>
      <description><![CDATA[Microsoft Small Basic provides a Turtle object that lets you draw on the graphics window with a...]]></description>
      <content:encoded><![CDATA[<FONT size=2 face=Verdana>
<P>Microsoft Small Basic provides a <STRONG>Turtle</STRONG> object that lets you draw on the graphics window with a little turtle. You can make the turtle crawl around, drawing&nbsp;wherever you lead it, as demonstrated in the following code that draws the word "Hi!" near the middle of the graphics window:</P><PRE><CODE>' Center of the graphics window.
w = GraphicsWindow.Width / 2
h = GraphicsWindow.Height / 2

' Move the turtle to the center of the graphics window.
Turtle.Show()
Turtle.X = w
Turtle.Y = h

' Make the turtle draw fast (but not too fast!).
Turtle.Speed = 7

' Draw the "H" in "Hi!"
Turtle.Turn(180) ' Turns the turtle at the specified speed.
Turtle.Move(40)
Turtle.MoveTo(w, h + 20) ' Same as Turtle.X with Turtle.Y, but moves at specified speed instead of instantly.
Turtle.TurnRight()
Turtle.Move(20)
Turtle.MoveTo(w + 20, h) 
Turtle.Angle = 180 ' Same as Turtle.Turn(180), but Turtle.Angle turns instantly.
Turtle.Move(40)

' Draw the "i" in "Hi!"
Turtle.X = w + 30 ' Same as first part of Turtle.MoveTo, but moves instantly and doesn't draw while moving.
Turtle.Y = h ' Same as second part of Turtle.MoveTo, but moves instantly and doesn't draw while moving.
Turtle.PenUp() ' Now, when the turtle moves, it won't also draw.
Turtle.Move(10)
Turtle.PenDown() ' Now the turtle draws as it moves.
Turtle.Move(5)
Turtle.PenUp() ' Stop drawing.
Turtle.Move(5)
Turtle.PenDown() ' Start drawing again.
Turtle.Move(20)

' Draw the "!" in "Hi!"
Turtle.X = w + 40
Turtle.Y = h
Turtle.Move(30)
Turtle.PenUp()
Turtle.Move(5)
Turtle.PenDown()
Turtle.Move(5)

Turtle.Hide()</CODE></PRE>
<P>Although not quite as fun, you can accomplish the same thing with the graphics window's <STRONG>DrawLine</STRONG> operation, as demonstrated in the following code:</P><PRE><CODE>' Center of the graphics window.
w = GraphicsWindow.Width / 2
h = GraphicsWindow.Height / 2

' Draw the "H" in "Hi!"
GraphicsWindow.DrawLine(w, h, w, h + 40)
GraphicsWindow.DrawLine(w, h + 20, w + 20, h + 20)
GraphicsWindow.DrawLine(w + 20, h, w + 20, h + 40)

' Draw the "i" in "Hi!"
GraphicsWindow.DrawLine(w + 30, h + 10, w + 30, h + 15)
GraphicsWindow.DrawLine(w + 30, h + 20, w + 30, h + 40)

' Draw the "!" in "Hi!"
GraphicsWindow.DrawLine(w + 40, h, w + 40, h + 30)
GraphicsWindow.DrawLine(w + 40, h + 35, w + 40, h + 40)</CODE></PRE></FONT>]]></content:encoded>
    </item>
    <item>
      <title>Small Basic #14: Mouse and Keyboard Events</title>
      <link>https://docs.microsoft.com/archive/blogs/paulcornell/small-basic-14-mouse-and-keyboard-events</link>
      <pubDate>Tue, 29 Dec 2009 14:28:00 GMT</pubDate>
      <dc:creator><![CDATA[Paul Cornell]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/paulcornell/2009/12/29/small-basic-14-mouse-and-keyboard-events/</guid>
      <description><![CDATA[If you're interested in creating basic text-based programs, Microsoft Small Basic&nbsp;has...]]></description>
      <content:encoded><![CDATA[<FONT size=2 face=Verdana>
<P>If you're interested in creating basic text-based programs, Microsoft Small Basic&nbsp;has <STRONG>TextWindow</STRONG> and <STRONG>Text</STRONG> objects&nbsp;are probably enough for your needs. However, if you're interested in interactive graphical programs (such as games or rich personal productivity applications), Microsoft Small Basic has a <STRONG>GraphicsWindow</STRONG> object that supports mouse and keyboard events. To learn about how it works, you can try importing the following code into Small Basic using ID <STRONG>KKG377 </STRONG>and then running it:</P><PRE><CODE>' Standard code for hooking up key, mouse, and text input actions to the graphics window.
GraphicsWindow.KeyDown = OnKeyDown
GraphicsWindow.KeyUp = OnKeyUp
GraphicsWindow.MouseDown = OnMouseDown
GraphicsWindow.MouseMove = OnMouseMove
GraphicsWindow.MouseUp = OnMouseUp
GraphicsWindow.TextInput = OnTextInput

Sub OnKeyDown
  ' Code for key presses goes here. 
  GraphicsWindow.Title = "'" + GraphicsWindow.LastKey + "' pressed" 
EndSub

Sub OnKeyUp
  ' Code for key releases goes here.
  GraphicsWindow.Title = "'" + GraphicsWindow.LastKey + "' released"
EndSub

Sub OnMouseDown
  ' Code for mouse button presses goes here.
  If Mouse.IsLeftButtonDown Then
    GraphicsWindow.Title = "Left button pressed"
  ElseIf Mouse.IsRightButtonDown Then
    GraphicsWindow.Title = "Right button pressed"
  Else
    GraphicsWindow.Title = "Some mouse button pressed (other than left and right)"
  EndIf
EndSub

Sub OnMouseMove
  ' Code for mouse moves goes here.
  ' GraphicsWindow.MouseX and GraphicsWindow.MouseY are relative to the graphics window.
  ' Mouse.MouseX and Mouse.MouseY are relative to the entire screen, which is typically bigger than the graphics window.
  GraphicsWindow.Title = "GWX = " + GraphicsWindow.MouseX + ", GWY = " + GraphicsWindow.MouseY + ", ScreenX = " + Mouse.MouseX + ", ScreenY = " + Mouse.MouseY
EndSub

Sub OnMouseUp
  ' Code for mouse button releases goes here.
  GraphicsWindow.Title = "Some mouse button released"
EndSub

Sub OnTextInput
  ' Code for text inputs goes here.  
EndSub</CODE></PRE>
<P>Notice that as you move the mouse, click and release mouse buttons, and press and release keys on the keyboard, the graphics window displays information about the mouse and key events. You can use this information to make your program take action in response to these events.&nbsp; </P></FONT>]]></content:encoded>
    </item>
  </channel>
</rss>