<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://ilovevb.net/Web/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title /><link>http://ilovevb.net/Web/blogs/</link><description>This site is all about the amazingly cool stuff you can do with VB.NET.</description><dc:language>en-US</dc:language><generator>CommunityServer 2007.1 (Build: 20917.1142)</generator><item><title>What a C# Coder Should Know Before They Write VB</title><link>http://ilovevb.net/Web/blogs/sitenews/archive/2008/07/19/what-a-c-coder-should-know-before-they-write-vb.aspx</link><pubDate>Sat, 19 Jul 2008 21:51:00 GMT</pubDate><guid isPermaLink="false">f079997d-67b3-4d49-aaea-86507d683840:151</guid><dc:creator>admin</dc:creator><slash:comments>0</slash:comments><description>&lt;p&gt;Kathleen Dollard has posted an excellent list of 51 (so far) things that a C# coder should know when working in Visual Basic.&lt;/p&gt;&lt;p&gt;I especially like #1 on the list:&amp;nbsp; &lt;i&gt;&amp;quot;Get over the respect thing or quit before you start. VB is a great language.&amp;quot;&lt;/i&gt; &lt;/p&gt;&lt;p&gt;Check it out:&amp;nbsp; &lt;a href="http://msmvps.com/blogs/kathleen/archive/2008/07.aspx"&gt;http://msmvps.com/blogs/kathleen/archive/2008/07.aspx&lt;/a&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;img src="http://ilovevb.net/Web/aggbug.aspx?PostID=151" width="1" height="1"&gt;</description><category domain="http://ilovevb.net/Web/blogs/sitenews/archive/tags/vb.net/default.aspx">vb.net</category><category domain="http://ilovevb.net/Web/blogs/sitenews/archive/tags/kathleen+dollard/default.aspx">kathleen dollard</category><category domain="http://ilovevb.net/Web/blogs/sitenews/archive/tags/c_2300_/default.aspx">c#</category></item><item><title>Pondering Pause</title><link>http://ilovevb.net/Web/blogs/nimble2d/archive/2008/06/29/pondering-pause.aspx</link><pubDate>Sun, 29 Jun 2008 20:47:00 GMT</pubDate><guid isPermaLink="false">f079997d-67b3-4d49-aaea-86507d683840:150</guid><dc:creator>MattWorden</dc:creator><slash:comments>0</slash:comments><description>&lt;p&gt;So, it&amp;#39;s been a few months since I posted here.&amp;nbsp; But, it&amp;#39;s not like I&amp;#39;ve been slacking.&amp;nbsp; I&amp;#39;ve even fleshed out some of the start-up sequence code for Nimble (I ended up changing one of my dev machines, and that caused me to need to do some extra caps checks and respond properly to what was found).&amp;nbsp; And then there is work and a half-dozen other &amp;quot;free time&amp;quot; projects (won&amp;#39;t go into a list here).&lt;/p&gt;
&lt;p&gt;&amp;nbsp;But, now we&amp;#39;ve come to a point where I need to stop and ponder a few things.&amp;nbsp; First, &lt;a class="" title="SlimDX June 2008 Release" href="http://code.google.com/p/slimdx/wiki/Downloads?tm=2" target="_blank"&gt;SlimDX has their June 2008 release&lt;/a&gt; out, which changes a few things ... and I think it would be best to bring Nimble up to the latest-and-greatest.&amp;nbsp; Second, I&amp;#39;ve been thinking through the games I&amp;#39;d like to get to making.&amp;nbsp; The responses I&amp;#39;ve gotten from the &lt;a class="" title="Air Rally Ace Tech Demo" href="http://ilovevb.net/Web/files/folders/nimble2d/entry115.aspx" target="_blank"&gt;ARA Tech Demo&lt;/a&gt; (plus some of my own re-tinkering) have made that fade from my mind as my &amp;quot;next big project&amp;quot;.&amp;nbsp; I find myself sliding back to my strategy/board gaming roots.&amp;nbsp; And those sorts of games wouldn&amp;#39;t really require a full Nimble2D-type engine to get to coding them ... in fact, they could probably be done using straight Graphics.Drawing calls.&amp;nbsp; Finally, I&amp;#39;ve found myself paying some attention to &lt;a class="" href="http://forums.indiegamer.com/showpost.php?p=157689&amp;amp;postcount=8" target="_blank"&gt;some wise advice&lt;/a&gt; I received from one of the folks hanging out at the &lt;a class="" title="Indiegamer Forums" href="http://forums.indiegamer.com/index.php" target="_blank"&gt;Indiegamers Forums&lt;/a&gt; -- find/build an engine to use quickly, so that games can get made.&lt;/p&gt;
&lt;p&gt;And now I&amp;#39;m off on a week&amp;#39;s vacation ... and I plan to do some pondering.&amp;nbsp; Advice and comments are always welcome! :-)&lt;/p&gt;&lt;img src="http://ilovevb.net/Web/aggbug.aspx?PostID=150" width="1" height="1"&gt;</description><category domain="http://ilovevb.net/Web/blogs/nimble2d/archive/tags/NimbleOverview/default.aspx">NimbleOverview</category><category domain="http://ilovevb.net/Web/blogs/nimble2d/archive/tags/KudosToOthers/default.aspx">KudosToOthers</category><category domain="http://ilovevb.net/Web/blogs/nimble2d/archive/tags/SlimDX/default.aspx">SlimDX</category></item><item><title>New Blogger on the site: TestHelpers</title><link>http://ilovevb.net/Web/blogs/sitenews/archive/2008/06/23/new-blogger-on-the-site-testhelpers.aspx</link><pubDate>Tue, 24 Jun 2008 03:57:00 GMT</pubDate><guid isPermaLink="false">f079997d-67b3-4d49-aaea-86507d683840:148</guid><dc:creator>admin</dc:creator><slash:comments>0</slash:comments><description>&lt;p&gt;We have a new blogger on the site.&amp;nbsp; Jon Starr has started his &lt;a href="http://www.ilovevb.net/web/blogs/testhelpers"&gt;TestHelpers&lt;/a&gt; blog and forums. I&amp;#39;ll let him fill you in on all the details though.&amp;nbsp;&lt;/p&gt;&lt;img src="http://ilovevb.net/Web/aggbug.aspx?PostID=148" width="1" height="1"&gt;</description><category domain="http://ilovevb.net/Web/blogs/sitenews/archive/tags/new+blog/default.aspx">new blog</category><category domain="http://ilovevb.net/Web/blogs/sitenews/archive/tags/testhelpers/default.aspx">testhelpers</category></item><item><title>Mobile Calculator Project</title><link>http://ilovevb.net/Web/blogs/csla/archive/2008/06/12/mobile-calculator-project.aspx</link><pubDate>Fri, 13 Jun 2008 00:51:00 GMT</pubDate><guid isPermaLink="false">f079997d-67b3-4d49-aaea-86507d683840:147</guid><dc:creator>Diesmia</dc:creator><slash:comments>0</slash:comments><description>&lt;p&gt;My first project is going to be a calculator for NETCF written in VB.Net. &lt;/p&gt;
&lt;p&gt;I hear you saying &amp;quot;It&amp;#39;s been done!&amp;quot;....and yer right.&lt;/p&gt;
&lt;p&gt;However, not like I want it to work. When I was in college, I had a stack screen calculator ( I suppose most of us did) and I liked it. I like being able to see what terms I used in my calculation. Combined with reverse polish notation, this makes for a powerfully quick calc. I also want it to give me the ability to define reusable global values and perhaps even functions, etc. &lt;/p&gt;
&lt;p&gt;So, I have begun first on a generic math parser class. I will make this class compatible with NETCF. Why? Because if I do, it will be very simple to reuse it anywhere I need a math parser. &lt;/p&gt;
&lt;p&gt;My first challenge was approach. How does one approach the parsing? For example, if I am looking at an eqn&amp;nbsp; like:&lt;/p&gt;
&lt;p&gt;2+(2*3 +(3+4)) + ((2+5) * 3 + (9*9))&lt;/p&gt;
&lt;p&gt;See all those nested parens? Every time I thought about how to approach this, my eyes started crossing....until my eyes cleared and one word appeared before them: recursion! &lt;/p&gt;
&lt;p&gt;See, I can process the string one character at a time...I can treat the numbers and operators and when I find an opening parens, I start from the back and find the correct closer...once I do, I sent the entire contents of the parens into a recursive version of the same function, and the process repeats. Once I don&amp;#39;t have any more parens, I calculate the values and unwind the stack...&lt;/p&gt;
&lt;p&gt;I have the parsing code started, and it does what I want, but I need to get the calculation stuff working....once done, I post an example here.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;img src="http://ilovevb.net/Web/aggbug.aspx?PostID=147" width="1" height="1"&gt;</description></item><item><title>Mapping Heroic Adventure!</title><link>http://ilovevb.net/Web/blogs/heroicadventure/archive/2008/06/11/mapping-heroic-adventure.aspx</link><pubDate>Thu, 12 Jun 2008 03:01:00 GMT</pubDate><guid isPermaLink="false">f079997d-67b3-4d49-aaea-86507d683840:146</guid><dc:creator>admin</dc:creator><slash:comments>0</slash:comments><description>&lt;p&gt;This project has gone through several different forms of source control and bug/issue/feature tracking (currently CodePlex for both) and has gotten a bit unwieldy.&amp;nbsp; &lt;/p&gt;&lt;p&gt;Lots of features have been started but not finished. Some of the stuff that&amp;#39;s been implemented doesn&amp;#39;t work quite the way I want it to, and other things could be rewritten to take advantage of newe, faster technologies.&lt;/p&gt;&lt;p&gt;To this end, I&amp;#39;ve decided to map out all the features I want to exist in HA! from the random dungeons to the hero properties and everything in between.&amp;nbsp; I&amp;#39;m using a technique called Mind Mapping to lay it all out. I&amp;#39;m using the FreeMind software to do it. (You can grab a copy at &lt;a href="http://Freemind.Sourceforge.Net"&gt;Freemind.Sourceforge.Net&lt;/a&gt;)&lt;/p&gt;&lt;p&gt;I&amp;#39;m only about 20% done with the map, but as I get further I&amp;#39;ll post a copy of the file for anyone who wants to look at it.&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;img src="http://ilovevb.net/Web/aggbug.aspx?PostID=146" width="1" height="1"&gt;</description><category domain="http://ilovevb.net/Web/blogs/heroicadventure/archive/tags/vb.net/default.aspx">vb.net</category><category domain="http://ilovevb.net/Web/blogs/heroicadventure/archive/tags/HA_2100_/default.aspx">HA!</category><category domain="http://ilovevb.net/Web/blogs/heroicadventure/archive/tags/mind+mapping/default.aspx">mind mapping</category></item><item><title>30 Days of .NET (Windows Mobile) Revisited</title><link>http://ilovevb.net/Web/blogs/vbmobile/archive/2008/06/02/30-days-of-net-windows-mobile-revisited.aspx</link><pubDate>Mon, 02 Jun 2008 17:33:57 GMT</pubDate><guid isPermaLink="false">f079997d-67b3-4d49-aaea-86507d683840:145</guid><dc:creator>BrainThump</dc:creator><slash:comments>0</slash:comments><description>&lt;p&gt;After talking with Chris (Craft) about his project for the next 30 days, I asked if he would mind whether or not I took his C# code and converted it to VB.NET to post here and he liked the idea. With that said look forward to having some updated code samples here as quickly as I can convert them. See Chris&amp;#39; &lt;a href="http://www.cjcraft.com/blog/2008/06/01/30DaysOfNETWindowsMobileApplications.aspx"&gt;blog&lt;/a&gt; for the latest installments he&amp;#39;s released.&lt;/p&gt;&lt;img src="http://ilovevb.net/Web/aggbug.aspx?PostID=145" width="1" height="1"&gt;</description><category domain="http://ilovevb.net/Web/blogs/vbmobile/archive/tags/Windows+Mobile/default.aspx">Windows Mobile</category><category domain="http://ilovevb.net/Web/blogs/vbmobile/archive/tags/.NET+Compact+Framework/default.aspx">.NET Compact Framework</category></item><item><title>30 Days of .NET (Windows Mobile Applications)</title><link>http://ilovevb.net/Web/blogs/vbmobile/archive/2008/06/02/30-days-of-net-windows-mobile-applications.aspx</link><pubDate>Mon, 02 Jun 2008 14:39:43 GMT</pubDate><guid isPermaLink="false">f079997d-67b3-4d49-aaea-86507d683840:144</guid><dc:creator>BrainThump</dc:creator><slash:comments>0</slash:comments><description>&lt;p&gt;Fellow Mobility Geek and friend &lt;a href="http://www.cjcraft.com/blog/default.aspx"&gt;Chris Craft&lt;/a&gt; has started a series on his blog which aims to showcase 30 Windows Mobile Applications in the next 30 days. Simple examples to get anyone started on the path towards Windows Mobile Development...now why didn&amp;#39;t I think of that? :)&lt;/p&gt; &lt;p&gt;Anyways, to tune in to what Chris is bringing you, head over to his &lt;a href="http://www.cjcraft.com/blog/2008/06/01/30DaysOfNETWindowsMobileApplications.aspx"&gt;blog&lt;/a&gt; and check it out!&lt;/p&gt;&lt;img src="http://ilovevb.net/Web/aggbug.aspx?PostID=144" width="1" height="1"&gt;</description><category domain="http://ilovevb.net/Web/blogs/vbmobile/archive/tags/Windows+Mobile/default.aspx">Windows Mobile</category><category domain="http://ilovevb.net/Web/blogs/vbmobile/archive/tags/.NET+Compact+Framework/default.aspx">.NET Compact Framework</category></item><item><title>Welcome to the re-launch!</title><link>http://ilovevb.net/Web/blogs/csla/archive/2008/05/31/welcome-to-the-re-launch.aspx</link><pubDate>Sat, 31 May 2008 13:38:00 GMT</pubDate><guid isPermaLink="false">f079997d-67b3-4d49-aaea-86507d683840:143</guid><dc:creator>Diesmia</dc:creator><slash:comments>0</slash:comments><description>&lt;p&gt;Adventures in CSLA has been relaunched as....&lt;/p&gt;
&lt;p&gt;&amp;nbsp;Schizo Developer!&lt;/p&gt;
&lt;p&gt;Sounds like an odd name, I know, but it stems from the fact that these days I do a lot of work with QTP (VBScript) generating automated testing for work, and VB.Net development at home for my own edification. In future, I&amp;#39;ll be posting code examples and such from both realms of the development world, automated testing and more traditional development. &lt;/p&gt;
&lt;p&gt;So, please check back from time to time to see what both sides of my brain are doing. :-)&lt;/p&gt;&lt;img src="http://ilovevb.net/Web/aggbug.aspx?PostID=143" width="1" height="1"&gt;</description></item><item><title>Slight change of plans...</title><link>http://ilovevb.net/Web/blogs/csla/archive/2008/05/19/slight-change-of-plans.aspx</link><pubDate>Mon, 19 May 2008 19:22:00 GMT</pubDate><guid isPermaLink="false">f079997d-67b3-4d49-aaea-86507d683840:141</guid><dc:creator>Diesmia</dc:creator><slash:comments>0</slash:comments><description>&lt;p&gt;Well, I guess the Adventures in CSLA didn&amp;#39;t get started like I hoped it would....&lt;/p&gt;
&lt;p&gt;&amp;nbsp;There&amp;#39;s been a change of scenery and jobs, and that has taken me away from it. I might be back on CSLA in the future, but lately, I&amp;#39;ve been getting more excited about doing mobile apps again. I confess most of my work has been in C# &amp;lt;gasp!&amp;gt; in the recent past, so this seems like a great time to do to things:&lt;/p&gt;
&lt;p&gt;1) Celerate the language in which I got my start&lt;/p&gt;
&lt;p&gt;2) Become reaquainted with NETCF development.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;So, be looking for more in the future....including a renaming of this blog, once I figure out what to call it.....&lt;/p&gt;&lt;img src="http://ilovevb.net/Web/aggbug.aspx?PostID=141" width="1" height="1"&gt;</description></item><item><title>Iowa Code Camp - XNA Session</title><link>http://ilovevb.net/Web/blogs/vbxna/archive/2008/05/03/iowa-code-camp-xna-session.aspx</link><pubDate>Sat, 03 May 2008 20:21:00 GMT</pubDate><guid isPermaLink="false">f079997d-67b3-4d49-aaea-86507d683840:137</guid><dc:creator>admin</dc:creator><slash:comments>0</slash:comments><description>&lt;p&gt;This weekend, I&amp;#39;m speaking at the Iowa Code Camp on &amp;quot;What&amp;#39;s This XNA Thing I Keep Hearing About?&amp;quot;&lt;/p&gt;
&lt;p&gt;I&amp;#39;m&amp;nbsp;covering some basic XNA 2.0 concepts and a couple demos.&amp;nbsp; I&amp;#39;m doing the &lt;em&gt;Spinning Bouncing Ball&lt;/em&gt; demo in C# and the &lt;em&gt;Chase Camera&lt;/em&gt; demo in VB.NET.&lt;/p&gt;
&lt;p&gt;I was going to show off the Race Car game demo, but my laptop gets about 3 frames per second in that game.&lt;/p&gt;&lt;img src="http://ilovevb.net/Web/aggbug.aspx?PostID=137" width="1" height="1"&gt;</description><category domain="http://ilovevb.net/Web/blogs/vbxna/archive/tags/xna/default.aspx">xna</category><category domain="http://ilovevb.net/Web/blogs/vbxna/archive/tags/vb.net/default.aspx">vb.net</category><category domain="http://ilovevb.net/Web/blogs/vbxna/archive/tags/code+camp/default.aspx">code camp</category></item><item><title>Windows Mobile slide deck and demo code posted</title><link>http://ilovevb.net/Web/blogs/vbmobile/archive/2008/04/22/windows-mobile-slide-deck-and-demo-code-posted.aspx</link><pubDate>Tue, 22 Apr 2008 13:57:19 GMT</pubDate><guid isPermaLink="false">f079997d-67b3-4d49-aaea-86507d683840:133</guid><dc:creator>BrainThump</dc:creator><slash:comments>0</slash:comments><description>&lt;p&gt;I&amp;#39;ve posted the slide deck and demo code from my user group presentation the other night. You can download it here: &lt;a title="http://ilovevb.net/Web/files/folders/vbmobile/entry132.aspx" href="http://ilovevb.net/Web/files/folders/vbmobile/entry132.aspx"&gt;http://ilovevb.net/Web/files/folders/vbmobile/entry132.aspx&lt;/a&gt;&lt;/p&gt; &lt;p&gt;The demo code shows basic SMS Messaging, State &amp;amp; Notifications Broker, Call Blocking (using the State and Notifications Broker) and using System Settings - all in VB.NET. &lt;/p&gt; &lt;p&gt;Enjoy!&lt;/p&gt;&lt;img src="http://ilovevb.net/Web/aggbug.aspx?PostID=133" width="1" height="1"&gt;</description><category domain="http://ilovevb.net/Web/blogs/vbmobile/archive/tags/Windows+Mobile/default.aspx">Windows Mobile</category><category domain="http://ilovevb.net/Web/blogs/vbmobile/archive/tags/.NET+Compact+Framework/default.aspx">.NET Compact Framework</category><category domain="http://ilovevb.net/Web/blogs/vbmobile/archive/tags/SMS/default.aspx">SMS</category><category domain="http://ilovevb.net/Web/blogs/vbmobile/archive/tags/Pocket+Outlook/default.aspx">Pocket Outlook</category><category domain="http://ilovevb.net/Web/blogs/vbmobile/archive/tags/State+and+Notifications+Broker/default.aspx">State and Notifications Broker</category></item><item><title>Bresenham's Line Algorithm - VB XNA style</title><link>http://ilovevb.net/Web/blogs/vbxna/archive/2008/04/15/bresenham-s-line-algorithm-vb-xna-style.aspx</link><pubDate>Tue, 15 Apr 2008 23:22:00 GMT</pubDate><guid isPermaLink="false">f079997d-67b3-4d49-aaea-86507d683840:131</guid><dc:creator>admin</dc:creator><slash:comments>0</slash:comments><description>&lt;div class="csharpcode"&gt;&lt;pre&gt;&lt;pre&gt;&lt;span class="lnum"&gt;&lt;/span&gt;&lt;/pre&gt;&lt;p&gt;&lt;span class="lnum"&gt;&lt;/span&gt;&lt;/p&gt;&lt;span class="lnum"&gt;&lt;/span&gt;&amp;nbsp;&lt;/pre&gt;&lt;pre&gt;&lt;span class="lnum"&gt;   1:  &lt;/span&gt;&lt;span class="kwrd"&gt;Imports&lt;/span&gt; Microsoft.Xna.Framework&lt;/pre&gt;&lt;pre&gt;&lt;span class="lnum"&gt;   2:  &lt;/span&gt;&lt;span class="kwrd"&gt;Imports&lt;/span&gt; System.Math&lt;/pre&gt;&lt;pre&gt;&lt;span class="lnum"&gt;   3:  &lt;/span&gt;&amp;nbsp;&lt;/pre&gt;&lt;pre&gt;&lt;span class="lnum"&gt;   4:  &lt;/span&gt;&lt;span class="kwrd"&gt;Public&lt;/span&gt; &lt;span class="kwrd"&gt;Class&lt;/span&gt; Utils&lt;/pre&gt;&lt;pre&gt;&lt;span class="lnum"&gt;   5:  &lt;/span&gt;    &lt;span class="rem"&gt;&amp;#39;&amp;#39;&amp;#39; &amp;lt;summary&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span class="lnum"&gt;   6:  &lt;/span&gt;    &lt;span class="rem"&gt;&amp;#39;&amp;#39;&amp;#39; This function uses Bresenham&amp;#39;s Line Algorithm to find the &lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span class="lnum"&gt;   7:  &lt;/span&gt;    &lt;span class="rem"&gt;&amp;#39;&amp;#39;&amp;#39; most direct path between two points on a 2D grid and stores &lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span class="lnum"&gt;   8:  &lt;/span&gt;    &lt;span class="rem"&gt;&amp;#39;&amp;#39;&amp;#39; all the points in a list.&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span class="lnum"&gt;   9:  &lt;/span&gt;    &lt;span class="rem"&gt;&amp;#39;&amp;#39;&amp;#39; &amp;lt;/summary&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span class="lnum"&gt;  10:  &lt;/span&gt;    &lt;span class="rem"&gt;&amp;#39;&amp;#39;&amp;#39; &amp;lt;param name=&amp;quot;StartPosition&amp;quot;&amp;gt;Starting X,Y coordinates&amp;lt;/param&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span class="lnum"&gt;  11:  &lt;/span&gt;    &lt;span class="rem"&gt;&amp;#39;&amp;#39;&amp;#39; &amp;lt;param name=&amp;quot;EndPosition&amp;quot;&amp;gt;Starting X,Y coordinates&amp;lt;/param&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span class="lnum"&gt;  12:  &lt;/span&gt;    &lt;span class="rem"&gt;&amp;#39;&amp;#39;&amp;#39; &amp;lt;returns&amp;gt;List(Of Vector2)&amp;lt;/returns&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span class="lnum"&gt;  13:  &lt;/span&gt;    &lt;span class="rem"&gt;&amp;#39;&amp;#39;&amp;#39; &amp;lt;remarks&amp;gt;&amp;lt;/remarks&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span class="lnum"&gt;  14:  &lt;/span&gt;    &lt;span class="kwrd"&gt;Public&lt;/span&gt; &lt;span class="kwrd"&gt;Function&lt;/span&gt; DeterminePath(&lt;span class="kwrd"&gt;ByVal&lt;/span&gt; StartPosition &lt;span class="kwrd"&gt;As&lt;/span&gt; Vector2, _&lt;/pre&gt;&lt;pre&gt;&lt;span class="lnum"&gt;  15:  &lt;/span&gt;&amp;nbsp;                  &lt;span class="kwrd"&gt;ByVal&lt;/span&gt; EndPosition &lt;span class="kwrd"&gt;As&lt;/span&gt; Vector2) &lt;span class="kwrd"&gt;As&lt;/span&gt; List(Of Vector2)&lt;/pre&gt;&lt;pre&gt;&lt;span class="lnum"&gt;  16:  &lt;/span&gt;        &lt;span class="kwrd"&gt;Dim&lt;/span&gt; myPoint &lt;span class="kwrd"&gt;As&lt;/span&gt; Vector2 = StartPosition &lt;span class="rem"&gt;&amp;#39; current point&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span class="lnum"&gt;  17:  &lt;/span&gt;        &lt;span class="kwrd"&gt;Dim&lt;/span&gt; myPath &lt;span class="kwrd"&gt;As&lt;/span&gt; &lt;span class="kwrd"&gt;New&lt;/span&gt; List(Of Vector2) &lt;span class="rem"&gt;&amp;#39; collection of path points&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span class="lnum"&gt;  18:  &lt;/span&gt;&amp;nbsp;&lt;/pre&gt;&lt;pre&gt;&lt;span class="lnum"&gt;  19:  &lt;/span&gt;        &lt;span class="rem"&gt;&amp;#39; Get the difference between 2 points&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span class="lnum"&gt;  20:  &lt;/span&gt;        &lt;span class="kwrd"&gt;Dim&lt;/span&gt; deltaX &lt;span class="kwrd"&gt;As&lt;/span&gt; &lt;span class="kwrd"&gt;Integer&lt;/span&gt; = EndPosition.X - StartPosition.X&lt;/pre&gt;&lt;pre&gt;&lt;span class="lnum"&gt;  21:  &lt;/span&gt;        &lt;span class="kwrd"&gt;Dim&lt;/span&gt; deltaY &lt;span class="kwrd"&gt;As&lt;/span&gt; &lt;span class="kwrd"&gt;Integer&lt;/span&gt; = EndPosition.Y - StartPosition.Y&lt;/pre&gt;&lt;pre&gt;&lt;span class="lnum"&gt;  22:  &lt;/span&gt;        &lt;span class="kwrd"&gt;Dim&lt;/span&gt; leftover &lt;span class="kwrd"&gt;As&lt;/span&gt; &lt;span class="kwrd"&gt;Integer&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span class="lnum"&gt;  23:  &lt;/span&gt;&amp;nbsp;&lt;/pre&gt;&lt;pre&gt;&lt;span class="lnum"&gt;  24:  &lt;/span&gt;        &lt;span class="rem"&gt;&amp;#39; Figure out direction based on the +/- value of the deltas&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span class="lnum"&gt;  25:  &lt;/span&gt;        &lt;span class="kwrd"&gt;Dim&lt;/span&gt; dirX &lt;span class="kwrd"&gt;As&lt;/span&gt; &lt;span class="kwrd"&gt;Integer&lt;/span&gt; = IIf(deltaX &amp;lt; 0, -1, 1)&lt;/pre&gt;&lt;pre&gt;&lt;span class="lnum"&gt;  26:  &lt;/span&gt;        &lt;span class="kwrd"&gt;Dim&lt;/span&gt; dirY &lt;span class="kwrd"&gt;As&lt;/span&gt; &lt;span class="kwrd"&gt;Integer&lt;/span&gt; = IIf(deltaY &amp;lt; 0, -1, 1)&lt;/pre&gt;&lt;pre&gt;&lt;span class="lnum"&gt;  27:  &lt;/span&gt;&amp;nbsp;&lt;/pre&gt;&lt;pre&gt;&lt;span class="lnum"&gt;  28:  &lt;/span&gt;        &lt;span class="rem"&gt;&amp;#39; Get absolute, we&amp;#39;ll decide whether to add/subtract later &lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span class="lnum"&gt;  29:  &lt;/span&gt;        deltaX = Abs(deltaX)&lt;/pre&gt;&lt;pre&gt;&lt;span class="lnum"&gt;  30:  &lt;/span&gt;        deltaY = Abs(deltaY)&lt;/pre&gt;&lt;pre&gt;&lt;span class="lnum"&gt;  31:  &lt;/span&gt;&amp;nbsp;&lt;/pre&gt;&lt;pre&gt;&lt;span class="lnum"&gt;  32:  &lt;/span&gt;        &lt;span class="rem"&gt;&amp;#39; Uncomment this to add the first point to the path (list)&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span class="lnum"&gt;  33:  &lt;/span&gt;        &lt;span class="rem"&gt;&amp;#39; myPath.Add(myPoint)&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span class="lnum"&gt;  34:  &lt;/span&gt;&amp;nbsp;&lt;/pre&gt;&lt;pre&gt;&lt;span class="lnum"&gt;  35:  &lt;/span&gt;        &lt;span class="rem"&gt;&amp;#39; iterate through whichever axis is longest&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span class="lnum"&gt;  36:  &lt;/span&gt;        &lt;span class="kwrd"&gt;If&lt;/span&gt; deltaX &amp;gt; deltaY &lt;span class="kwrd"&gt;Then&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span class="lnum"&gt;  37:  &lt;/span&gt;            leftover = (deltaY * 2) - deltaX&lt;/pre&gt;&lt;pre&gt;&lt;span class="lnum"&gt;  38:  &lt;/span&gt;            &lt;span class="kwrd"&gt;While&lt;/span&gt; myPoint.X &amp;lt;&amp;gt; EndPosition.X&lt;/pre&gt;&lt;pre&gt;&lt;span class="lnum"&gt;  39:  &lt;/span&gt;                &lt;span class="kwrd"&gt;If&lt;/span&gt; leftover &amp;gt;= 0 &lt;span class="kwrd"&gt;Then&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span class="lnum"&gt;  40:  &lt;/span&gt;                    myPoint.Y = myPoint.Y + dirY&lt;/pre&gt;&lt;pre&gt;&lt;span class="lnum"&gt;  41:  &lt;/span&gt;                    leftover = leftover - deltaX&lt;/pre&gt;&lt;pre&gt;&lt;span class="lnum"&gt;  42:  &lt;/span&gt;                &lt;span class="kwrd"&gt;End&lt;/span&gt; &lt;span class="kwrd"&gt;If&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span class="lnum"&gt;  43:  &lt;/span&gt;                myPoint.X = myPoint.X + dirX&lt;/pre&gt;&lt;pre&gt;&lt;span class="lnum"&gt;  44:  &lt;/span&gt;                leftover = leftover + deltaY&lt;/pre&gt;&lt;pre&gt;&lt;span class="lnum"&gt;  45:  &lt;/span&gt;                myPath.Add(myPoint)&lt;/pre&gt;&lt;pre&gt;&lt;span class="lnum"&gt;  46:  &lt;/span&gt;            &lt;span class="kwrd"&gt;End&lt;/span&gt; &lt;span class="kwrd"&gt;While&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span class="lnum"&gt;  47:  &lt;/span&gt;        &lt;span class="kwrd"&gt;Else&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span class="lnum"&gt;  48:  &lt;/span&gt;            leftover = (deltaX * 2) - deltaY&lt;/pre&gt;&lt;pre&gt;&lt;span class="lnum"&gt;  49:  &lt;/span&gt;            &lt;span class="kwrd"&gt;While&lt;/span&gt; myPoint.Y &amp;lt;&amp;gt; EndPosition.Y&lt;/pre&gt;&lt;pre&gt;&lt;span class="lnum"&gt;  50:  &lt;/span&gt;                &lt;span class="kwrd"&gt;If&lt;/span&gt; leftover &amp;gt;= 0 &lt;span class="kwrd"&gt;Then&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span class="lnum"&gt;  51:  &lt;/span&gt;                    myPoint.X = myPoint.X + dirX&lt;/pre&gt;&lt;pre&gt;&lt;span class="lnum"&gt;  52:  &lt;/span&gt;                    leftover = leftover - deltaY&lt;/pre&gt;&lt;pre&gt;&lt;span class="lnum"&gt;  53:  &lt;/span&gt;                &lt;span class="kwrd"&gt;End&lt;/span&gt; &lt;span class="kwrd"&gt;If&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span class="lnum"&gt;  54:  &lt;/span&gt;                myPoint.Y = myPoint.Y + dirY&lt;/pre&gt;&lt;pre&gt;&lt;span class="lnum"&gt;  55:  &lt;/span&gt;                leftover = leftover + deltaX&lt;/pre&gt;&lt;pre&gt;&lt;span class="lnum"&gt;  56:  &lt;/span&gt;                myPath.Add(myPoint)&lt;/pre&gt;&lt;pre&gt;&lt;span class="lnum"&gt;  57:  &lt;/span&gt;            &lt;span class="kwrd"&gt;End&lt;/span&gt; &lt;span class="kwrd"&gt;While&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span class="lnum"&gt;  58:  &lt;/span&gt;        &lt;span class="kwrd"&gt;End&lt;/span&gt; &lt;span class="kwrd"&gt;If&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span class="lnum"&gt;  59:  &lt;/span&gt;&amp;nbsp;&lt;/pre&gt;&lt;pre&gt;&lt;span class="lnum"&gt;  60:  &lt;/span&gt;        &lt;span class="kwrd"&gt;Return&lt;/span&gt; myPath&lt;/pre&gt;&lt;pre&gt;&lt;span class="lnum"&gt;  61:  &lt;/span&gt;    &lt;span class="kwrd"&gt;End&lt;/span&gt; &lt;span class="kwrd"&gt;Function&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span class="lnum"&gt;  62:  &lt;/span&gt;&lt;span class="kwrd"&gt;End&lt;/span&gt; &lt;span class="kwrd"&gt;Class&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;&lt;span class="lnum"&gt;While I was working on my EnemyAI demo for code camp, I needed a way to plot the most efficient line between two points. Bresenham&amp;#39;s Line Drawing Algorithm is pretty much the industry standard for lines, but I couldn&amp;#39;t find a VB implementation I liked, so I wrote my own. &lt;/span&gt;&lt;span class="lnum"&gt;I went ahead and used the Vector2 data type from XNA, but if you aren&amp;#39;t doing XNA you could easily create a custom data type that contains a pair of integer values.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;The way you use this is pretty simple.&amp;nbsp; Given two sets of coordinates (begin and end position), this will return a collection of Vector2s.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;h2&gt;How it works&lt;/h2&gt;
&lt;p&gt;This algorithm compares the delta between the starting and ending X coordinate, and the starting and ending Y coordinate. In order to have the straightest possible line (that isn&amp;#39;t purely horizontal or purely vertical) we have a rule that you can&amp;#39;t have adjacent pixels on the shortest axis. This provides a much smoother transition along the longer axis.&lt;/p&gt;&lt;img src="http://ilovevb.net/Web/aggbug.aspx?PostID=131" width="1" height="1"&gt;</description><category domain="http://ilovevb.net/Web/blogs/vbxna/archive/tags/xna/default.aspx">xna</category><category domain="http://ilovevb.net/Web/blogs/vbxna/archive/tags/vb.net/default.aspx">vb.net</category><category domain="http://ilovevb.net/Web/blogs/vbxna/archive/tags/bresenham/default.aspx">bresenham</category></item><item><title>Robotics Studio samples coming soon</title><link>http://ilovevb.net/Web/blogs/sitenews/archive/2008/04/15/robotics-studio-samples-coming-soon.aspx</link><pubDate>Tue, 15 Apr 2008 20:51:00 GMT</pubDate><guid isPermaLink="false">f079997d-67b3-4d49-aaea-86507d683840:128</guid><dc:creator>admin</dc:creator><slash:comments>0</slash:comments><description>&lt;p&gt;If you&amp;#39;re interested in Microsoft Robotics Studio, but despaired at the lack of VB samples... we&amp;#39;re here for you. &lt;/p&gt;&lt;p&gt;Keep checking back to the site as we&amp;#39;ve got some people working on putting together some VB demos, samples and tutorials. Once they are ready, we&amp;#39;ll launch a VB Robotics blog and forums to go with them. &lt;/p&gt;&lt;img src="http://ilovevb.net/Web/aggbug.aspx?PostID=128" width="1" height="1"&gt;</description><category domain="http://ilovevb.net/Web/blogs/sitenews/archive/tags/vb.net/default.aspx">vb.net</category><category domain="http://ilovevb.net/Web/blogs/sitenews/archive/tags/demos/default.aspx">demos</category><category domain="http://ilovevb.net/Web/blogs/sitenews/archive/tags/samples/default.aspx">samples</category><category domain="http://ilovevb.net/Web/blogs/sitenews/archive/tags/robotics+studio/default.aspx">robotics studio</category></item><item><title>Getting started with the .NET Compact Framework</title><link>http://ilovevb.net/Web/blogs/vbmobile/archive/2008/04/08/getting-started-with-the-net-compact-framework.aspx</link><pubDate>Tue, 08 Apr 2008 10:50:00 GMT</pubDate><guid isPermaLink="false">f079997d-67b3-4d49-aaea-86507d683840:127</guid><dc:creator>BrainThump</dc:creator><slash:comments>3</slash:comments><description>&lt;p&gt;This article explains the basics of building a simple but useful application using the .NET Compact Framework where we’ll go beyond “Hello World” but not so far that you’ll get lost in the process. We accomplish this by focusing on building our application while starting to realize some of the limitations and workarounds Compact Framework developers face.&lt;/p&gt;
&lt;p&gt;By the end of the article you’ll have a clear understanding of just how easy it can be to get started developing your own Compact Framework applications. If you’ve been coding along with the article, you’ll also have built a template for future development projects.&lt;/p&gt;
&lt;h3&gt;&lt;a class="" title="_Toc154247392" name="_Toc154247392"&gt;&lt;/a&gt;Part 1 – Background Info&lt;/h3&gt;
&lt;h4&gt;&lt;a class="" title="_Toc154247393" name="_Toc154247393"&gt;&lt;/a&gt;Section 1 – A Short Time Ago at a Code Camp Near You…&lt;/h4&gt;
&lt;h5&gt;&lt;a class="" title="_Toc154247394" name="_Toc154247394"&gt;&lt;/a&gt;&lt;i&gt;The Theo And Lou Show&lt;/i&gt;&lt;i&gt;&lt;/i&gt;&lt;/h5&gt;
&lt;p&gt;In September 2006 Theo Moore and I co-presented a fun Code Camp session on .NET Compact Framework Game Development. We had quite a few people show up across the entire 3+ hour session (with breaks of course!) and the interaction with the developers who were there was great.&lt;/p&gt;
&lt;p&gt;One of the things that I think surprised me the most was that there seemed to be an overwhelming notion (among those viewing our session) that .NET Compact Framework was going to be waaaaay different than programming the “full” .NET Framework. I even had guys come up to me afterwards and mention that one thing that had kept them from exploring the Compact Framework was they thought they might have to re-learn a bunch of stuff. Now, without getting into lengthy discussions about specifics, for a good number of basic apps, the code can remain the same although your interface design will need some changes to accommodate smaller screens, etc.&lt;/p&gt;
&lt;h5&gt;&lt;a class="" title="_Toc154247395" name="_Toc154247395"&gt;&lt;/a&gt;&lt;i&gt;7000 downloads and counting!&lt;/i&gt;&lt;i&gt;&lt;/i&gt;&lt;/h5&gt;
&lt;p&gt;To illustrate this point I often use my wildly popular Tip Calculator/Bill Splitter which uses the same code base in the full .NET Framework and the .NET Compact Framework. In fact, I developed it first in the full framework and then copied/pasted it into my CF project when I was ready. I did all this because I wanted to get started developing CF applications but wanted something a little more robust than “Hello World!”&lt;/p&gt;
&lt;p&gt;Here’s a shot of what the finished program looks like on PocketGear.com:&lt;/p&gt;
&lt;p&gt;&lt;a href="http://ilovevb.net/Web/blogs/vbmobile/WindowsLiveWriter/Gettingstartedwithth.NETCompactFramework_6037/clip_image002_2.jpg"&gt;&lt;img style="BORDER-RIGHT:0px;BORDER-TOP:0px;BORDER-LEFT:0px;BORDER-BOTTOM:0px;" height="156" alt="clip_image002" src="http://ilovevb.net/Web/blogs/vbmobile/WindowsLiveWriter/Gettingstartedwithth.NETCompactFramework_6037/clip_image002_thumb.jpg" width="244" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;If you’re interested in downloading the program for yourself, you can do so free of charge at PocketGear.com with the following link: &lt;a href="http://classic.pocketgear.com/software_detail.asp?id=17954"&gt;http://classic.pocketgear.com/software_detail.asp?id=17954&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;I had no idea when I released this little application that it would become so widely used. &lt;/p&gt;
&lt;p&gt;It’s even been featured in &lt;a href="http://www.pctoday.com/"&gt;PC Today&lt;/a&gt; magazine as one of their Mobile Tips in the February 2006 issue. ( &lt;a href="http://www.pctoday.com/editorial/article.asp?article=articles%2F2006%2Ft0402%2F19t02%2F19t02.asp"&gt;http://www.pctoday.com/editorial/article.asp?article=articles%2F2006%2Ft0402%2F19t02%2F19t02.asp&lt;/a&gt; )&lt;/p&gt;
&lt;p&gt;&lt;a href="http://ilovevb.net/Web/blogs/vbmobile/WindowsLiveWriter/Gettingstartedwithth.NETCompactFramework_6037/clip_image004_2.jpg"&gt;&lt;img style="BORDER-RIGHT:0px;BORDER-TOP:0px;BORDER-LEFT:0px;BORDER-BOTTOM:0px;" height="105" alt="clip_image004" src="http://ilovevb.net/Web/blogs/vbmobile/WindowsLiveWriter/Gettingstartedwithth.NETCompactFramework_6037/clip_image004_thumb.jpg" width="244" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h3&gt;&lt;a class="" title="_Toc154247396" name="_Toc154247396"&gt;&lt;/a&gt;Part 2 – Not your average “Hello World”&lt;/h3&gt;
&lt;h4&gt;&lt;/h4&gt;
&lt;h4&gt;&lt;a class="" title="_Toc154247397" name="_Toc154247397"&gt;&lt;/a&gt;Section 2 – Getting Started&lt;/h4&gt;
&lt;h5&gt;&lt;a class="" title="_Toc154247398" name="_Toc154247398"&gt;&lt;/a&gt;&lt;i&gt;Required Software&lt;/i&gt;&lt;i&gt;&lt;/i&gt;&lt;/h5&gt;
&lt;p&gt;So how do we start? First things first – the Visual Basic and C# Express Editions do not support Compact Framework. If you have Visual Studio 2003, you can follow along just fine, though the screen shots will look different, none of the code (I’m pretty sure!) I’m using in this demo is .NET 2.0 specific. If you’re not fortunate enough to have Visual Studio 2005 Professional there’s hope – attending your local Microsoft Sponsored User Events like local .NET User Groups, MSDN Code Camps, etc. often result in one or more lucky persons walking away with that as a prize…in fact at the September 2006 South Carolina Code Camp, 2 people won Visual Studio 2005 Professional and we’ve given away a few copies as prizes to our Greater Charleston .NET User Group members…just one more reason to get involved in your local developer community!&lt;/p&gt;
&lt;h5&gt;&lt;i&gt;&lt;/i&gt;&lt;/h5&gt;
&lt;h5&gt;&lt;a class="" title="_Toc154247399" name="_Toc154247399"&gt;&lt;/a&gt;&lt;i&gt;Working with your project in the IDE&lt;/i&gt;&lt;i&gt;&lt;/i&gt;&lt;/h5&gt;
&lt;p&gt;So that said, let’s fire up Visual Studio 2005 Professional and start a new project as shown in the screen below:&lt;/p&gt;
&lt;p&gt;&lt;a href="http://ilovevb.net/Web/blogs/vbmobile/WindowsLiveWriter/Gettingstartedwithth.NETCompactFramework_6037/clip_image006_2.jpg"&gt;&lt;img style="BORDER-RIGHT:0px;BORDER-TOP:0px;BORDER-LEFT:0px;BORDER-BOTTOM:0px;" height="151" alt="clip_image006" src="http://ilovevb.net/Web/blogs/vbmobile/WindowsLiveWriter/Gettingstartedwithth.NETCompactFramework_6037/clip_image006_thumb.jpg" width="244" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;So here we’re creating a project that targets a Pocket PC 2003 device (only because I don’t own a Windows Mobile 5 device myself) and we’re also targeting a project for 2.0 framework. Incidentally if you want to create a 1.0 Compact Framework project in VS 2005 you still can. The project icon right underneath the one I’ve selected above is for a 1.0 project.&lt;/p&gt;
&lt;p&gt;Once we’ve created the project we’re presented with a screenshot showing an emulator background where we can begin development of our application. See the screenshot below:&lt;/p&gt;
&lt;p&gt;&lt;a href="http://ilovevb.net/Web/blogs/vbmobile/WindowsLiveWriter/Gettingstartedwithth.NETCompactFramework_6037/clip_image008_2.jpg"&gt;&lt;img style="BORDER-RIGHT:0px;BORDER-TOP:0px;BORDER-LEFT:0px;BORDER-BOTTOM:0px;" height="216" alt="clip_image008" src="http://ilovevb.net/Web/blogs/vbmobile/WindowsLiveWriter/Gettingstartedwithth.NETCompactFramework_6037/clip_image008_thumb.jpg" width="244" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;If you’re following along with us using Visual Studio 2003, you won’t see the emulator image in the background, but instead see a much smaller (and probably more familiar) Windows Form. I personally think the emulator image in the background is a nice touch added in VS 2005 and was pretty stoked to learn about some of the other nice things that come with that, but that’s a topic for a later lesson.&lt;/p&gt;
&lt;p&gt;In looking at this form you can see it’s not so radically different than standard Windows forms (except for the background image of a Pocket PC). Interacting with the form, setting properties, etc. all remains the same. That said; let’s get some things set up so we can write some code!&lt;/p&gt;
&lt;h5&gt;&lt;a class="" title="_Toc154247400" name="_Toc154247400"&gt;&lt;/a&gt;&lt;i&gt;Some helpful advice&lt;/i&gt;&lt;i&gt;&lt;/i&gt;&lt;/h5&gt;
&lt;p&gt;Alright – if you look at the screenshot below you’ll notice a few things have changed. To help illustrate the changes, I’ve added color coding to bring focus to the changes I’ve made.&lt;/p&gt;
&lt;p&gt;The first thing I want to draw your attention to is the Yellow-Bordered box both on the form itself and the Form1 Properties window. This is where I’ve set the caption for my Pocket PC application. That in and of itself isn’t too much different than what you’d do with a Windows form, but one thing to keep in mind is that there is limited real estate for your entire app, to include the form’s caption bar which is shared on the Pocket PC by notifications. You’ll see as we progress with this project that my current choice of text for the form caption is not a good idea as the “Bill Splitter” part stands to be covered up by those notifications.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://ilovevb.net/Web/blogs/vbmobile/WindowsLiveWriter/Gettingstartedwithth.NETCompactFramework_6037/clip_image010_2.jpg"&gt;&lt;img style="BORDER-RIGHT:0px;BORDER-TOP:0px;BORDER-LEFT:0px;BORDER-BOTTOM:0px;" height="218" alt="clip_image010" src="http://ilovevb.net/Web/blogs/vbmobile/WindowsLiveWriter/Gettingstartedwithth.NETCompactFramework_6037/clip_image010_thumb.jpg" width="244" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h5&gt;&lt;i&gt;&lt;/i&gt;&lt;/h5&gt;
&lt;h5&gt;&lt;a class="" title="_Toc154247401" name="_Toc154247401"&gt;&lt;/a&gt;&lt;i&gt;A Mini-Rant about Smart Minimize&lt;/i&gt;&lt;i&gt;&lt;/i&gt;&lt;/h5&gt;
&lt;p&gt;The next thing I’ll point out is one of my standard modifications I make to most Pocket PC applications I build. If you look at the Green-bordered box around the “OK” button in the top right corner of the Pocket PC form and the Form 1 properties window you might wonder “OK, what’s the big deal?” Microsoft has very good reasons for making the default action of a Compact Framework application to be “Smart Minimize versus closing the application outright, but my biggest gripe with it has always been the fact they use an “X” to denote “Smart Minimize” in the Compact Framework while everyone who’s used to WinForms knows that “X” is “Close”. Enough with my mini-rant, if you want to read more about “Smart Minimize versus Close” then check out the following blog entry on the Windows Mobile Team blog called “&lt;a href="http://blogs.msdn.com/windowsmobile/archive/2006/10/05/The-Emperor-Has-No-Close.aspx"&gt;The Emperor has no Close&lt;/a&gt;”.&lt;/p&gt;
&lt;p&gt;The reason I chose to override Smart Minimize and force a form closure is because the apps I’m building are mostly for entertainment purposes…not exactly something that needs to be running all the time waiting around to be disposed. That said – at least now you have a better idea of what’s going on with that and why I made the choice I did.&lt;/p&gt;
&lt;h5&gt;&lt;a class="" title="_Toc154247402" name="_Toc154247402"&gt;&lt;/a&gt;&lt;i&gt;The Big Red Panel&lt;/i&gt;&lt;i&gt;&lt;/i&gt;&lt;/h5&gt;
&lt;p&gt;Another item that stands out in the screen above is the big red rectangle at the bottom of the form. Let’s take a closer look at this in the IDE screen shot below:&lt;/p&gt;
&lt;p&gt;&lt;a href="http://ilovevb.net/Web/blogs/vbmobile/WindowsLiveWriter/Gettingstartedwithth.NETCompactFramework_6037/clip_image012_2.jpg"&gt;&lt;img style="BORDER-RIGHT:0px;BORDER-TOP:0px;BORDER-LEFT:0px;BORDER-BOTTOM:0px;" height="190" alt="clip_image012" src="http://ilovevb.net/Web/blogs/vbmobile/WindowsLiveWriter/Gettingstartedwithth.NETCompactFramework_6037/clip_image012_thumb.jpg" width="244" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;The size is exactly 80 pixels high which also (not by accident!) happens to be the size of the SIP (Soft Input Panel) when it’s activated and visible on screen. The reason I put the “Big Red Panel” in place is to remind me of that when designing the form in the IDE so as not to place controls there which would be hidden by the SIP when active. It’s a lazy way around the problem in reality, but again for the type of application this is, it works just fine. See the screenshots below to compare having the SIP hidden and then active (also a live shot of a production app after the big red panel):&lt;/p&gt;
&lt;p&gt;&lt;a href="http://ilovevb.net/Web/blogs/vbmobile/WindowsLiveWriter/Gettingstartedwithth.NETCompactFramework_6037/clip_image014_2.jpg"&gt;&lt;img style="BORDER-RIGHT:0px;BORDER-TOP:0px;BORDER-LEFT:0px;BORDER-BOTTOM:0px;" height="244" alt="clip_image014" src="http://ilovevb.net/Web/blogs/vbmobile/WindowsLiveWriter/Gettingstartedwithth.NETCompactFramework_6037/clip_image014_thumb.jpg" width="156" border="0" /&gt;&lt;/a&gt; &lt;a href="http://ilovevb.net/Web/blogs/vbmobile/WindowsLiveWriter/Gettingstartedwithth.NETCompactFramework_6037/clip_image016_2.jpg"&gt;&lt;img style="BORDER-RIGHT:0px;BORDER-TOP:0px;BORDER-LEFT:0px;BORDER-BOTTOM:0px;" height="244" alt="clip_image016" src="http://ilovevb.net/Web/blogs/vbmobile/WindowsLiveWriter/Gettingstartedwithth.NETCompactFramework_6037/clip_image016_thumb.jpg" width="154" border="0" /&gt;&lt;/a&gt; &lt;a href="http://ilovevb.net/Web/blogs/vbmobile/WindowsLiveWriter/Gettingstartedwithth.NETCompactFramework_6037/clip_image018_2.jpg"&gt;&lt;img style="BORDER-RIGHT:0px;BORDER-TOP:0px;BORDER-LEFT:0px;BORDER-BOTTOM:0px;" height="244" alt="clip_image018" src="http://ilovevb.net/Web/blogs/vbmobile/WindowsLiveWriter/Gettingstartedwithth.NETCompactFramework_6037/clip_image018_thumb.jpg" width="154" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Of course two things are worth noting here…&lt;/p&gt;
&lt;p&gt;1) When I’m done with development and ready to deploy the project I get rid of the “Big Red Panel” and replace it with something else, usually a banner of something else that isn’t critical to the program operation (see above).&lt;/p&gt;
&lt;p&gt;2) This is just a simple hack, what I should be doing is to resize/and or re-position my controls as needed.&lt;/p&gt;
&lt;p&gt;What brought about this in the first place? When I first read the Microsoft guide to getting your software “Windows Logo Certified” this was one of the requirements, that nothing could be blocked by the SIP when active. I’m a long way from being “Windows Logo Certified” but this little tidbit of info stuck with me.&lt;/p&gt;
&lt;h5&gt;&lt;a class="" title="_Toc154247403" name="_Toc154247403"&gt;&lt;/a&gt;&lt;i&gt;Finishing the “Template”&lt;/i&gt;&lt;i&gt;&lt;/i&gt;&lt;/h5&gt;
&lt;p&gt;At this point we have our basic form layout finished. We’ve chosen to override Smart-Minimize and we’ve created our “Big Red Panel” SIP placeholder. Something you might do at this point is save the project, close it all and copy the project folder to a new folder named “Pocket PC Project Template” (or something similar) and even go as far as to ZIP that new folder so that in the future it’s easy to get started with future Compact Framework project. I’ve actually saved off several such “template” folders for different development needs which I can pull out as needed. Is this a hard and fast requirement to be an effective Compact Framework developer? Nah – but it sure has helped me out since I’ve been doing it.&lt;/p&gt;
&lt;h4&gt;&lt;a class="" title="_Toc154247404" name="_Toc154247404"&gt;&lt;/a&gt;Section 3 – The Visual Interface&lt;/h4&gt;
&lt;h5&gt;&lt;a class="" title="_Toc154247405" name="_Toc154247405"&gt;&lt;/a&gt;&lt;i&gt;Working with limited screen real estate&lt;/i&gt;&lt;i&gt;&lt;/i&gt;&lt;/h5&gt;
&lt;p&gt;We’ll finish off adding the visual elements to our form before we plug in the code. In all actuality this is the exact same as you’d do for a Windows Forms project, just find your control, drag-n-drop it on the form and then set properties on it. OK – so the purists out there are saying that I’m leaving something out…well yes. You’ll notice that because this is the Compact Framework that there are some controls missing, but for our purposes right now, we have everything we need. The screenshot below illustrates the project with the rest of the visual elements added:&lt;/p&gt;
&lt;p&gt;&lt;a href="http://ilovevb.net/Web/blogs/vbmobile/WindowsLiveWriter/Gettingstartedwithth.NETCompactFramework_6037/clip_image020_2.jpg"&gt;&lt;img style="BORDER-RIGHT:0px;BORDER-TOP:0px;BORDER-LEFT:0px;BORDER-BOTTOM:0px;" height="244" alt="clip_image020" src="http://ilovevb.net/Web/blogs/vbmobile/WindowsLiveWriter/Gettingstartedwithth.NETCompactFramework_6037/clip_image020_thumb.jpg" width="229" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;As you can see we’ve simply added an image, a few label controls, a text box, a button and a few numeric up-downs. The reason this is worth mentioning is because after we cover this next part you can go to a Windows Forms app and add the same items with the same names and you’ll see the code work just the same!&lt;/p&gt;
&lt;h3&gt;&lt;a class="" title="_Toc154247406" name="_Toc154247406"&gt;&lt;/a&gt;Part 3 – Core Code&lt;/h3&gt;
&lt;h4&gt;&lt;a class="" title="_Toc154247407" name="_Toc154247407"&gt;&lt;/a&gt;Section 4 – Just some math&lt;/h4&gt;
&lt;h5&gt;&lt;a class="" title="_Toc154247408" name="_Toc154247408"&gt;&lt;/a&gt;&lt;i&gt;Main Code Listing (in VB.NET)&lt;/i&gt;&lt;i&gt;&lt;/i&gt;&lt;/h5&gt;
&lt;p&gt;Let’s get to the code! See the code screen shot below for what we’ll begin working with:&lt;/p&gt;
&lt;p&gt;&lt;a href="http://ilovevb.net/Web/blogs/vbmobile/WindowsLiveWriter/Gettingstartedwithth.NETCompactFramework_6037/clip_image022_2.jpg"&gt;&lt;img style="BORDER-RIGHT:0px;BORDER-TOP:0px;BORDER-LEFT:0px;BORDER-BOTTOM:0px;" height="104" alt="clip_image022" src="http://ilovevb.net/Web/blogs/vbmobile/WindowsLiveWriter/Gettingstartedwithth.NETCompactFramework_6037/clip_image022_thumb.jpg" width="244" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Alright – a few disclaimers about the code…could it be written better? Sure. I went for readability here versus elegance. So let’s focus more on function versus fashion for the time being J&lt;/p&gt;
&lt;h5&gt;&lt;i&gt;&lt;/i&gt;&lt;/h5&gt;
&lt;h5&gt;&lt;a class="" title="_Toc154247410" name="_Toc154247410"&gt;&lt;/a&gt;&lt;i&gt;Wiring the button&lt;/i&gt;&lt;i&gt;&lt;/i&gt;&lt;/h5&gt;
&lt;p&gt;Once you plug that code in and call the sub from the Button_Click event you’ve got a functioning application! That wasn’t so hard was it? Of course not…and now you have a basic functioning Compact Framework application. Wasn’t that more fun than “Hello World”? I thought so too. One of the things I encourage you to do is to go ahead and test this same code in a WinForms application, after all it’s just a simple math operation after all. &lt;/p&gt;
&lt;p&gt;The main reason I picked this application to illustrate basic development under the Compact Framework is because of what I mentioned at the start of this article. I’ve had developers come to me after I’ve given a presentation on Compact Framework to either a user group or a Code Camp audience and they’ve told me they thought developing these projects were much harder than I’ve made it out to be here. Does that mean I’m trying to say that developing real world applications for the Compact Framework will be easy? Nope. We’ve got resource constraints, chief among them processing power, network connectivity, screen real estate and user input methods to contend with if you want to develop an elegant and functional mobile application. What I hope to accomplish by providing this information is to show how easy it is to get started and also show you some of the things I’ve discovered along the way that will hopefully get you thinking about ways to tackle these problems as they relate to your development projects.&lt;/p&gt;
&lt;h4&gt;&lt;/h4&gt;
&lt;h4&gt;&lt;a class="" title="_Toc154247411" name="_Toc154247411"&gt;&lt;/a&gt;Section 5 – This program sucks, let’s improve it.&lt;/h4&gt;
&lt;h5&gt;&lt;a class="" title="_Toc154247412" name="_Toc154247412"&gt;&lt;/a&gt;&lt;i&gt;Making our program more user friendly&lt;/i&gt;&lt;i&gt;&lt;/i&gt;&lt;/h5&gt;
&lt;p&gt;Let’s look next at how we can improve this project to make it a little more bearable for users other than ourselves. For example, if someone enters the numbers in the Meal Cost box using the SIP, then shouldn’t it auto-hide when they hit “Calculate”? What about going a step further and hiding the SIP if/when they hit the ENTER key on the SIP? These are perfectly valid operations and along the lines of the type of thing you might handle on a web form or Windows form so it makes sense to handle these here as well.&lt;/p&gt;
&lt;p&gt;Additionally what happens if the user wants to figure changes in the tip by toggling up or down the Tip Percentage number? What about if the guest split option changes? For example if there are four in the party and then one person says they’ll pick up another person’s tab? Now the four becomes three. Shouldn’t our application handle these changes on-the-fly without requiring further clicks or input after toggling the up/down options? Good – I’m glad you think so because you can call it feature creep if you want, but that’s what we’re doing next!&lt;/p&gt;
&lt;p&gt;&lt;i&gt;Here’s the functionality we’re going to add:&lt;/i&gt;&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Auto-Hide the SIP when ENTER key on SIP is pressed&lt;/li&gt;
&lt;li&gt;Auto-Hide the SIP when “Calculate” button is pressed&lt;/li&gt;
&lt;li&gt;Auto-Convert the display of “Meal Cost”, “Tip Amount”, “Price per Guest”, and “Total Meal Cost” to currency format.&lt;/li&gt;
&lt;li&gt;Auto-Recalculate “Tip Amount”, and “Price per Guest” when the Tip Percentage number is toggled either up or down.&lt;/li&gt;
&lt;li&gt;Auto-Recalculate “Tip Amount”, and “Price per Guest” when the “# of Guests” is toggled either up or down.&lt;/li&gt;&lt;/ol&gt;
&lt;h5&gt;&lt;a class="" title="_Toc154247413" name="_Toc154247413"&gt;&lt;/a&gt;&lt;i&gt;Implementing the changes-Auto Hide the SIP when ENTER key is pressed&lt;/i&gt;&lt;i&gt;&lt;/i&gt;&lt;/h5&gt;
&lt;p&gt;The first change we’ll tackle is Auto-Hiding the SIP when the ENTER key is pressed on the SIP. This is basically going to improve the user experience and get the SIP out of the way when we presume it’s no longer needed, (i.e., they’ve finished entering information).&lt;/p&gt;
&lt;p&gt;Those of you who have been programming any length of time may recall capturing such events are rather easy – perhaps the thought of interacting with this SIP has you wondering if it’s more complex. The simple answer is “no”. Check it out:&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;a href="http://ilovevb.net/Web/blogs/vbmobile/WindowsLiveWriter/Gettingstartedwithth.NETCompactFramework_6037/image_4.png"&gt;&lt;img style="BORDER-RIGHT:0px;BORDER-TOP:0px;BORDER-LEFT:0px;BORDER-BOTTOM:0px;" height="61" alt="image" src="http://ilovevb.net/Web/blogs/vbmobile/WindowsLiveWriter/Gettingstartedwithth.NETCompactFramework_6037/image_thumb_1.png" width="244" border="0" /&gt;&lt;/a&gt; 
&lt;p&gt;First the public function to convert the key pressed into it’s ASCII number and then wire the text box key-press event to watch for the ENTER Key (ASCII 13).&lt;/p&gt;
&lt;p&gt;Now some of you might be thinking – “Hey where’s the SIP code there?” – I confess…I got sneaky and introduced another “fix” by handling the SIP Hide as part of my TipCalc sub. If you noticed in the VB.NET code listing previously there was a Sip.Hide line of code commented out. Here’s the block of code that handles hiding the SIP:&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;a href="http://ilovevb.net/Web/blogs/vbmobile/WindowsLiveWriter/Gettingstartedwithth.NETCompactFramework_6037/image_6.png"&gt;&lt;img style="BORDER-RIGHT:0px;BORDER-TOP:0px;BORDER-LEFT:0px;BORDER-BOTTOM:0px;" height="53" alt="image" src="http://ilovevb.net/Web/blogs/vbmobile/WindowsLiveWriter/Gettingstartedwithth.NETCompactFramework_6037/image_thumb_2.png" width="244" border="0" /&gt;&lt;/a&gt; &lt;/p&gt;
&lt;p&gt;This way of hiding the SIP is purposefully more “complex” than it needs to be because this was also part of me learning how to use PInvoke, (Platform Invoke) which is how you can call Win32 or unmanaged APIs using the .NET framework (which is of course, managed code). &lt;/p&gt;
&lt;h5&gt;&lt;a class="" title="_Toc154247414" name="_Toc154247414"&gt;&lt;/a&gt;&lt;i&gt;A lesson I learned from a goofy mistake I made&lt;/i&gt;&lt;i&gt;&lt;/i&gt;&lt;/h5&gt;
&lt;p&gt;The simpler way to handle this would have been to drop an InputPanel control on my form and handle hiding and showing it (along with resizing the form, etc.) via code that way. Way back when I was first experimenting with the Compact Framework and reading about increasing performance by limiting the number of controls you load on the form, I thought to myself “Great – I can have one less control by using PInvoke instead of dropping the InputPanel control on my form” Those of you who know better are laughing right now because you know (as I have since learned) how expensive PInvoke is! In any case this was my first introduction to PInvoke and I’ve included it ever since as a short and simple way to introduce others to it. Would you use this in a real world application? Probably not. But hopefully you’ll take away the basic concept and do some additional research on your own to determine if and when PInvoke might be a good idea for your application. Also - since you brought it up, now’s a good time to look at the PInvoke sample we’re using here.&lt;/p&gt;
&lt;h5&gt;&lt;a class="" title="_Toc154247415" name="_Toc154247415"&gt;&lt;/a&gt;&lt;i&gt;A Gentle Introduction to PInvoke&lt;/i&gt;&lt;i&gt;&lt;/i&gt;&lt;/h5&gt;
&lt;p&gt;I mentioned just a moment ago a little bit about what PInvoke is so let’s take a look at what it looks like in our code sample. Note that this is a separate class I’m using in my project. If you were going to use a lot of PInvoke code, it might make sense to build a class library of this stuff.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://ilovevb.net/Web/blogs/vbmobile/WindowsLiveWriter/Gettingstartedwithth.NETCompactFramework_6037/image_2.png"&gt;&lt;img style="BORDER-RIGHT:0px;BORDER-TOP:0px;BORDER-LEFT:0px;BORDER-BOTTOM:0px;" height="121" alt="image" src="http://ilovevb.net/Web/blogs/vbmobile/WindowsLiveWriter/Gettingstartedwithth.NETCompactFramework_6037/image_thumb.png" width="244" border="0" /&gt;&lt;/a&gt; &lt;/p&gt;
&lt;h5&gt;&lt;i&gt;&lt;/i&gt;&lt;/h5&gt;
&lt;p&gt;There is so much one could write about PInvoke, it could be a whole chapter or book in itself, much farther beyond the scope of this lesson. If you want to find out more you can get started by reading &lt;i&gt;&lt;u&gt;&lt;a href="http://msdn2.microsoft.com/en-us/library/aa446536.aspx"&gt;An Introduction to P/Invoke and Marshaling on the Microsoft .NET Compact Framework&lt;/a&gt;&lt;/u&gt;&lt;/i&gt; on MSDN. For some pre-written PInvoke signatures, check out the samples provided at &lt;a href="http://www.pinvoke.net/"&gt;http://www.pinvoke.net/&lt;/a&gt;&lt;/p&gt;
&lt;h5&gt;&lt;i&gt;&lt;/i&gt;&lt;/h5&gt;
&lt;h5&gt;&lt;a class="" title="_Toc154247416" name="_Toc154247416"&gt;&lt;/a&gt;&lt;i&gt;Implementing the changes-Auto Hide the SIP when CALCULATE button is pressed&lt;/i&gt;&lt;i&gt;&lt;/i&gt;&lt;/h5&gt;
&lt;p&gt;The good news is that this change was implemented auto-magically when I decided to incorporate the SIP.HIDE functionality as part of the TipCalc subroutine. So hey – that was easy…every time the Calculate Button is pressed it’s wired up to call TipCalc() and the SIP goes away. Hurray!&lt;/p&gt;
&lt;p&gt;Coming later – Packaging and Deploying your application…that’s all for now folks!&lt;/p&gt;&lt;img src="http://ilovevb.net/Web/aggbug.aspx?PostID=127" width="1" height="1"&gt;</description><category domain="http://ilovevb.net/Web/blogs/vbmobile/archive/tags/.NET+Compact+Framework/default.aspx">.NET Compact Framework</category><category domain="http://ilovevb.net/Web/blogs/vbmobile/archive/tags/P-Invoke/default.aspx">P-Invoke</category></item><item><title>LINQ and AJAX webinar sample code</title><link>http://ilovevb.net/Web/blogs/linq/archive/2008/03/25/linq-and-ajax-webinar-sample-code.aspx</link><pubDate>Tue, 25 Mar 2008 18:35:00 GMT</pubDate><guid isPermaLink="false">f079997d-67b3-4d49-aaea-86507d683840:120</guid><dc:creator>admin</dc:creator><slash:comments>0</slash:comments><description>&lt;p&gt;This is the sample code used in the 3 demos I did today (3/25/08) for the Magenic Webinar on Visual Studio 2008.&amp;nbsp; &lt;b&gt;&lt;a href="http://ilovevb.net/Web/files/folders/linq/entry121.aspx"&gt;Grab it here.&lt;/a&gt;&lt;/b&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;The archive contains a solution with 2 aspx pages and the related VB codebehind files.&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;You should be able to look at the query and get a good idea of the schema of the Person table. (ID, LName, FName, City, State)&amp;nbsp;&lt;/p&gt;&lt;p&gt;There are two &amp;quot;regions&amp;quot; in the default.aspx page.&amp;nbsp; One is just regular HTML, and the other has an AJAX UpdatePanel and a ScriptManager control.&amp;nbsp; Anything you want to &amp;quot;AJAXify&amp;quot; needs to go inside the update panel (near the bottom half of the page.)&lt;/p&gt;&lt;p&gt;The Default.aspx page is used for the first two demos, and the LINQToObjects.aspx page is used for the 3rd demo.&amp;nbsp;&lt;/p&gt;&lt;p&gt;If you have any questions, please post a comment.&amp;nbsp;&lt;/p&gt;&lt;img src="http://ilovevb.net/Web/aggbug.aspx?PostID=120" width="1" height="1"&gt;</description><category domain="http://ilovevb.net/Web/blogs/linq/archive/tags/LINQ/default.aspx">LINQ</category><category domain="http://ilovevb.net/Web/blogs/linq/archive/tags/SQL/default.aspx">SQL</category><category domain="http://ilovevb.net/Web/blogs/linq/archive/tags/AJAX/default.aspx">AJAX</category><category domain="http://ilovevb.net/Web/blogs/linq/archive/tags/VB.NET/default.aspx">VB.NET</category></item><item><title>VB Lately</title><link>http://ilovevb.net/Web/blogs/vbnews/archive/2008/03/24/vb-lately.aspx</link><pubDate>Mon, 24 Mar 2008 18:28:00 GMT</pubDate><guid isPermaLink="false">f079997d-67b3-4d49-aaea-86507d683840:119</guid><dc:creator>admin</dc:creator><slash:comments>0</slash:comments><description>
&lt;p&gt;Over the last month, I have asked a lot of people (including consultants, VB MVPs, in-house developers, students and hobbyists) how they use VB.NET and to tell me the most recent thing they had done with it. I&amp;#39;m still putting all of it together, but I wanted to share some of it now. So, here are some of their answers:&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;&lt;i&gt;&amp;quot;In the course of 1 week in February I presented on the XML features of VB9 then a couple of days later helped a team put them to use to quickly create a POC for creating Excel documents on the server.&amp;quot;&lt;/i&gt; - Keith Franklin, General Manager - Magenic&lt;/p&gt;
&lt;p&gt;&lt;i&gt;&lt;br /&gt;&amp;quot;Developed an online library cataloguing system for a museum in Dublin.&amp;nbsp;Developed a file encryption application in VB.Net. Am developing a funds management application for financial institutions at present&amp;quot;&lt;/i&gt; - Jamie Plenderleith, Consultant&lt;/p&gt;
&lt;p&gt;&lt;i&gt;&lt;br /&gt;&amp;quot;I wrote an XPathViewer utility to answer this person&amp;#39;s question: &lt;/i&gt;&lt;a href="http://forums.devx.com/showthread.php?t=166787"&gt;&lt;i&gt;http://forums.devx.com/showthread.php?t=166787&lt;/i&gt;&lt;/a&gt;&lt;i&gt;&amp;quot;&lt;/i&gt; - Phil Weber&lt;/p&gt;
&lt;p&gt;&lt;i&gt;&lt;br /&gt;&amp;quot;The last VB.NET application I wrote was a K-means clustering application with element weighting that allows you to cluster data gathered from a SQL statement against any datasource.&amp;quot;&lt;/i&gt; - Perry Pinion, Senior Programmer/Analyst - Advance Auto Parts&lt;/p&gt;
&lt;p&gt;&lt;i&gt;&lt;br /&gt;&amp;quot;I&amp;#39;ve been working on&amp;nbsp;Game Al routines for an XNA demo I&amp;#39;m doing at Code Camp.&amp;quot;&lt;/i&gt; - Chris Williams, Technology Evangelist - Magenic&lt;/p&gt;
&lt;p&gt;&lt;i&gt;&lt;br /&gt;&amp;quot;I wrote a &lt;a href="http://code.msdn.microsoft.com/LinqPersonalWeb" class=""&gt;LINQ enabled Personal Web Starter Kit&lt;/a&gt;&amp;nbsp;&lt;/i&gt;&lt;i&gt;that enables users to view and manage photos which are stored in SQL Server. The database interaction is done in LINQ.&amp;quot;&lt;/i&gt; - Jim Wooley, VB MVP&lt;/p&gt;
&lt;p&gt;&lt;i&gt;&lt;br /&gt;&amp;quot;We have a web site where all conference content is maintained. We wrote a tool in VB.NET to extract images from that website and create Conference CD’s from the conference content (speakers, exhibitors, sessions, etc). This file exports all content to XML format that is then rendered on a CD using CSS and JavaScript.&amp;quot;&lt;/i&gt; - Rod Paddock, Editor - CoDe Magazine&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;i&gt;&lt;br /&gt;&amp;quot;I recently was asked how to use a background image on a form, but not cover the image up if you placed a tabcontrol on the form which covered much of the picture. Since there is no built in way to accomplish this, I take the background image, figure out what portion is covered by the tabcontrol, and I crop and draw that portion onto the tabpage. Add some gamma overcorrection, and you get a nice faded/glass effect of the background image.&amp;quot;&lt;/i&gt; - Matt Kleinwaks, VB MVP&lt;/p&gt;&lt;p&gt;&lt;i&gt;&lt;br /&gt;&amp;quot;We&amp;#39;re using System.Speech (part of WPF in 3.0) to access the MS speech
API. Leveraging this technology, we&amp;#39;re able to record inspections of
electrical transmission structures (towers and poles to the lay person)
using voice... in a helicopter inflight... without training the
software to the user&amp;#39;s voice. We&amp;#39;re also using ESRI GIS products to
provide a map with the helicopter&amp;#39;s position and identify the structure
being inspected in real time... all in VB .NET.&amp;quot;&lt;/i&gt; - Jeff Certain&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;img src="http://ilovevb.net/Web/aggbug.aspx?PostID=119" width="1" height="1"&gt;</description><category domain="http://ilovevb.net/Web/blogs/vbnews/archive/tags/MVP/default.aspx">MVP</category><category domain="http://ilovevb.net/Web/blogs/vbnews/archive/tags/Magenic/default.aspx">Magenic</category><category domain="http://ilovevb.net/Web/blogs/vbnews/archive/tags/vb.net/default.aspx">vb.net</category><category domain="http://ilovevb.net/Web/blogs/vbnews/archive/tags/starter+kit/default.aspx">starter kit</category><category domain="http://ilovevb.net/Web/blogs/vbnews/archive/tags/CoDe/default.aspx">CoDe</category><category domain="http://ilovevb.net/Web/blogs/vbnews/archive/tags/LINQ/default.aspx">LINQ</category></item><item><title>Deferred Execution</title><link>http://ilovevb.net/Web/blogs/linq/archive/2008/03/24/deferred-execution.aspx</link><pubDate>Mon, 24 Mar 2008 16:57:00 GMT</pubDate><guid isPermaLink="false">f079997d-67b3-4d49-aaea-86507d683840:118</guid><dc:creator>admin</dc:creator><slash:comments>0</slash:comments><description>&lt;p&gt;Here&amp;#39;s a quick and dirty&amp;nbsp;example of LINQ to Objects that my friend Justin showed me. Actually, he showed me in C#, but it took all of about 45 seconds to rewrite it in VB.NET so here it is:&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;1. Create an ASPX page in Visual Studio and add a GridView Control. Leave the name as GridView1.&lt;br /&gt;&lt;/strong&gt;(You can do this any number of ways, like a console app, but I happened to do it in an aspx page.)&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;2. In your codebehind page, add the following to the form1.Load event:&lt;/strong&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Protected Sub form1_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles form1.Load &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim filter As String = &amp;quot;System&amp;quot; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim query = From a In AppDomain.CurrentDomain.GetAssemblies() _ &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Where a.GetName().Name.Contains(filter) _ &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Select a.GetName.Name &lt;/p&gt;
&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;#39;filter = &amp;quot;Xml&amp;quot; &lt;/p&gt;
&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; GridView1.DataSource = query &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; GridView1.DataBind() &lt;br /&gt;End Sub &lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;&lt;strong&gt;Be sure to leave the &amp;#39;filter = &amp;quot;Xml&amp;quot; line commented out for now, we&amp;#39;ll come back to that in a minute!!&lt;/strong&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Now run the page. You should see something that looks like this:&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="http://geekswithblogs.net/images/geekswithblogs_net/cwilliams/WindowsLiveWriter/DeferredExecutioninLINQ_FE1C/image_2.png"&gt;&lt;img style="BORDER-TOP-WIDTH:0px;BORDER-LEFT-WIDTH:0px;BORDER-BOTTOM-WIDTH:0px;BORDER-RIGHT-WIDTH:0px;" height="531" alt="image" src="http://geekswithblogs.net/images/geekswithblogs_net/cwilliams/WindowsLiveWriter/DeferredExecutioninLINQ_FE1C/image_thumb.png" width="278" border="0" /&gt;&lt;/a&gt; &lt;/p&gt;
&lt;p&gt;&lt;strong&gt;You should be looking at a list of Namespaces that begin with &amp;quot;System.&amp;quot;&amp;nbsp; Once you&amp;#39;re done ooh&amp;#39;ing and ahh&amp;#39;ing over it, go back to your codebehind page and... &lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;3. uncomment the &amp;#39;filter = &amp;quot;Xml&amp;quot; line.&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Now you&amp;#39;re probably thinking, so what Chris, it&amp;#39;s not going to do anything because it&amp;#39;s AFTER the query...&amp;nbsp; But that is where you&amp;#39;d be wrong. Suspend your disbelief for a moment and take my word for it. I&amp;#39;ll explain in a second.&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;So, if you uncomment that line, and run the code again, this time you should see something like this:&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="http://geekswithblogs.net/images/geekswithblogs_net/cwilliams/WindowsLiveWriter/DeferredExecutioninLINQ_FE1C/image_4.png"&gt;&lt;img style="BORDER-TOP-WIDTH:0px;BORDER-LEFT-WIDTH:0px;BORDER-BOTTOM-WIDTH:0px;BORDER-RIGHT-WIDTH:0px;" height="267" alt="image" src="http://geekswithblogs.net/images/geekswithblogs_net/cwilliams/WindowsLiveWriter/DeferredExecutioninLINQ_FE1C/image_thumb_1.png" width="286" border="0" /&gt;&lt;/a&gt; &lt;/p&gt;
&lt;p&gt;&lt;strong&gt;I know, crazy huh?&lt;/strong&gt;&lt;/p&gt;&lt;strong&gt;
&lt;p&gt;&lt;/strong&gt;&lt;strong&gt;What happens is this... when you create your query, it&amp;#39;s not actually executing until you need it. In this case, it&amp;#39;s the databind. In other cases, it might be when you call the .ToArray method of your resultset, or when you add the contents to a custom object, or the .Count method, etc...&lt;/strong&gt;&lt;/p&gt;&lt;strong&gt;
&lt;p&gt;&lt;strong&gt;See... there&amp;#39;s this thing called Deferred Execution, and it&amp;#39;s part of LINQ. It gives us a lot of flexibility. If you need to stick different peices of data from the same source in multiple places, for example, build your query, databind your grid, change that ONE line of code, databind your other grid... awesome, huh?&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;/strong&gt;&lt;strong&gt;Enjoy!&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;(For a much more detailed explanation, I recommend heading over to this MSDN article:&amp;nbsp; &lt;/em&gt;&lt;a class="" href="http://msdn2.microsoft.com/en-us/library/ms364068(vs.80).aspx"&gt;&lt;em&gt;Overview of Visual Basic 9.0&lt;/em&gt;&lt;/a&gt;&lt;em&gt;&amp;nbsp; It&amp;#39;s about 2/3rds of the way down, but the whole article is good reading. It&amp;#39;s by Erik Meijer, Amanda Silver, and Paul Vick.)&lt;/em&gt;&lt;/p&gt;&lt;img src="http://ilovevb.net/Web/aggbug.aspx?PostID=118" width="1" height="1"&gt;</description><category domain="http://ilovevb.net/Web/blogs/linq/archive/tags/LINQ/default.aspx">LINQ</category><category domain="http://ilovevb.net/Web/blogs/linq/archive/tags/Deferred+Execution/default.aspx">Deferred Execution</category><category domain="http://ilovevb.net/Web/blogs/linq/archive/tags/VB9/default.aspx">VB9</category></item><item><title>Fun with VB LINQ</title><link>http://ilovevb.net/Web/blogs/linq/archive/2008/03/24/fun-with-vb-linq.aspx</link><pubDate>Mon, 24 Mar 2008 16:53:00 GMT</pubDate><guid isPermaLink="false">f079997d-67b3-4d49-aaea-86507d683840:117</guid><dc:creator>admin</dc:creator><slash:comments>0</slash:comments><description>&lt;p&gt;I&amp;#39;ve spent the last few weeks working on some demos for VB LINQ (among other things)&amp;nbsp;and once I got the hang of it, rather enjoyed it. &lt;/p&gt;
&lt;p&gt;So, I decided to set up this blog to document some of the neat stuff I&amp;#39;ve learned. As I continue to play and find all the various things you can LINQ to, I&amp;#39;ll add them to this blog. I&amp;#39;ll also be posting any code samples in the related file section, as well as this blog, so you can just download them and start working with them right away.&lt;/p&gt;&lt;img src="http://ilovevb.net/Web/aggbug.aspx?PostID=117" width="1" height="1"&gt;</description><category domain="http://ilovevb.net/Web/blogs/linq/archive/tags/LINQ/default.aspx">LINQ</category></item><item><title>Quiet Month</title><link>http://ilovevb.net/Web/blogs/sitenews/archive/2008/03/24/quiet-month.aspx</link><pubDate>Mon, 24 Mar 2008 15:23:00 GMT</pubDate><guid isPermaLink="false">f079997d-67b3-4d49-aaea-86507d683840:116</guid><dc:creator>admin</dc:creator><slash:comments>0</slash:comments><description>&lt;p&gt;It&amp;#39;s been a pretty quiet month over here at ILoveVB.net but don&amp;#39;t worry, we&amp;#39;re not going anywhere. I&amp;#39;ve been sick off and on most of the winter (welcome to Minnesota) and when not hacking up a lung, I&amp;#39;ve just been really busy working on Code Camp sessions and Webinars and the like.&amp;nbsp; The cool part is that a lot of that work will be making it onto this site eventualy.&lt;/p&gt;
&lt;p&gt;Andy&amp;nbsp;Dunn has managed to get some of my VB XNA Samples working on the 360, so that&amp;#39;s pretty exciting. Expect blog posts on that before too much longer.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I&amp;#39;ve also spent some time on HA! but I&amp;#39;ll save that for a different blog post as well.&lt;/p&gt;
&lt;p&gt;Now that they tell me Spring is more or less here (aside from the foot of snow we got this weekend) maybe I&amp;#39;ll start feeling better and yuo&amp;#39;ll start seeing more content on the site again.&lt;/p&gt;
&lt;p&gt;Thanks for stopping by!&lt;/p&gt;
&lt;p&gt;Chris&lt;/p&gt;&lt;img src="http://ilovevb.net/Web/aggbug.aspx?PostID=116" width="1" height="1"&gt;</description></item><item><title>My "QuickTrig" Helper Class</title><link>http://ilovevb.net/Web/blogs/nimble2d/archive/2008/03/08/my-quot-quicktrig-quot-helper-class.aspx</link><pubDate>Sat, 08 Mar 2008 17:22:00 GMT</pubDate><guid isPermaLink="false">f079997d-67b3-4d49-aaea-86507d683840:111</guid><dc:creator>MattWorden</dc:creator><slash:comments>0</slash:comments><description>&lt;p&gt;I&amp;#39;ve uploaded a ZIP file that contains the source code for the &amp;quot;QuickTrig&amp;quot; helper class that I&amp;#39;ve mentioned a couple of times now.&amp;nbsp; You can get it by &lt;a class="" title="QuickTrig Helper Class Source Code" href="http://ilovevb.net/Web/files/folders/nimble2d/entry110.aspx" target="_blank"&gt;clicking this link&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;For those curious, looking through that should help explain how I can handle my angles primarily in degrees (as mentioned in my previous post).&lt;/p&gt;
&lt;p&gt;Feel free to give it a look ... and use it if it helps you out.&amp;nbsp; Performance-wise, I&amp;#39;ve found the COS and SIN look-up functions to take half the time of the comparable Math.Cos and Math.Sin traditional functions.&amp;nbsp; While the speed increase is nice, being able to just work in degrees with the rest of my code is the biggest help given by this class.&lt;/p&gt;
&lt;p&gt;-Matt&lt;/p&gt;&lt;img src="http://ilovevb.net/Web/aggbug.aspx?PostID=111" width="1" height="1"&gt;</description><category domain="http://ilovevb.net/Web/blogs/nimble2d/archive/tags/Nimble2D/default.aspx">Nimble2D</category></item><item><title>The [L]ook command</title><link>http://ilovevb.net/Web/blogs/heroicadventure/archive/2008/03/02/the-l-ook-command.aspx</link><pubDate>Sun, 02 Mar 2008 23:46:00 GMT</pubDate><guid isPermaLink="false">f079997d-67b3-4d49-aaea-86507d683840:108</guid><dc:creator>admin</dc:creator><slash:comments>0</slash:comments><description>&lt;p&gt;I actually managed to work on HA! some more this weekend while not doing &amp;quot;other&amp;quot; things (like driving almost 40 minutes each way to the airport to retrieve lost luggage... and tech-editing an upcoming VB 2008 book. (Paying gigs unfortunately must take priority over fun stuff.)&lt;/p&gt;&lt;p&gt;So anyway. I worked on the [L]ook command today. (Technically it&amp;#39;s the [l]ook command since the lowercase &amp;quot;l&amp;quot; is the action key.)&lt;/p&gt;&lt;p&gt;Basically, the look command functions like this:&lt;/p&gt;&lt;ol&gt;&lt;li&gt;Make cursor visible under Hero. &lt;br /&gt;&lt;/li&gt;&lt;li&gt;Display instructions at top of screen (use movement keys to look, z or [spacebar] to exit.&lt;/li&gt;&lt;li&gt;As player moves cursor around screen, display relevant information about location, following this order of precedence:&lt;/li&gt;&lt;ul&gt;&lt;li&gt;Has tile been seen before?&lt;/li&gt;&lt;ul&gt;&lt;li&gt;creature type (eventually add link to full description, with observed stats)&lt;/li&gt;&lt;li&gt;pile of items (There is a pile of items here.)&lt;/li&gt;&lt;li&gt;single item (show item name, eventually add link to more info.)&lt;/li&gt;&lt;li&gt;trap type (if previously discovered)&lt;/li&gt;&lt;li&gt;tile description (if nothing else is on the tile, show what type of tile it is)&lt;/li&gt;&lt;/ul&gt;&lt;li&gt;If the tile has never been seen&lt;/li&gt;&lt;ul&gt;&lt;li&gt;&amp;quot;You don&amp;#39;t know anything about this place.&amp;quot;&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/ul&gt;&lt;li&gt;Loop until player presses z or [spacebar]&lt;/li&gt;&lt;li&gt;Hide cursor&lt;/li&gt;&lt;li&gt;Return control to main game loop&lt;/li&gt;&lt;/ol&gt;&lt;p&gt;The tricky part about working on this is setting the order of priority and taking things like Line of Sight, Fog of War, etc into consideration.&lt;/p&gt;&lt;p&gt;&lt;b&gt;&lt;br /&gt;This part is still in planning:&lt;/b&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;i&gt;A couple of the items (creatures and items) that currently only display a type will link to a description page. The cool part behind this (as planned) is that the description page will be dynamically built based on what the Hero has observed:&amp;nbsp; &lt;/i&gt;&lt;/p&gt;&lt;p&gt;&lt;i&gt;If you&amp;#39;ve never fought a Kobold, [l]ooking at a Kobold won&amp;#39;t tell you much other than what it looks like. After you&amp;#39;ve fought a few, [l]ooking at one will tell you a lot more, such as approximate speed, how often they hit, how hard and what weapon type they use. Additional info such as how much experience they are worth, what sort of things they drop, etc might also be added.&lt;/i&gt;&lt;/p&gt;&lt;p&gt;&lt;i&gt;Items would work the same way. If it&amp;#39;s unidentified, you get nothing but the very brief item title. Once it&amp;#39;s identified, you get a little more, and once you&amp;#39;ve used a few of that exact item type, you start getting more detailed info, averaged from usage results.&lt;br /&gt;&lt;/i&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;img src="http://ilovevb.net/Web/aggbug.aspx?PostID=108" width="1" height="1"&gt;</description><category domain="http://ilovevb.net/Web/blogs/heroicadventure/archive/tags/rpg/default.aspx">rpg</category><category domain="http://ilovevb.net/Web/blogs/heroicadventure/archive/tags/heroic+adventure/default.aspx">heroic adventure</category><category domain="http://ilovevb.net/Web/blogs/heroicadventure/archive/tags/command/default.aspx">command</category><category domain="http://ilovevb.net/Web/blogs/heroicadventure/archive/tags/look/default.aspx">look</category></item><item><title>Units of Measure</title><link>http://ilovevb.net/Web/blogs/nimble2d/archive/2008/02/22/units-of-measure.aspx</link><pubDate>Sat, 23 Feb 2008 03:21:00 GMT</pubDate><guid isPermaLink="false">f079997d-67b3-4d49-aaea-86507d683840:103</guid><dc:creator>MattWorden</dc:creator><slash:comments>4</slash:comments><description>&lt;p&gt;I&amp;#39;ve been working through some auto-moving sprite functionality, and have wandered a bit further down that road than I&amp;nbsp;originally expected to at this point&amp;nbsp;... so now I need to back up a bit to get back on the main route of progress.&amp;nbsp; Here is my list of current things to do:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;div&gt;Finish fleshing-out my auto-move sprite class (going to set it up to work like a cross between a simple-but-somewhat-intelligent game object and a particle)&lt;/div&gt;&lt;/li&gt;
&lt;li&gt;
&lt;div&gt;Crop things down into a &amp;quot;base&amp;quot; sprite class ... and change the auto-move sprite to inherit from the base&lt;/div&gt;&lt;/li&gt;
&lt;li&gt;
&lt;div&gt;Build the primative (circle, rectangle, triangle, line) sprites from the base sprite&lt;/div&gt;&lt;/li&gt;
&lt;li&gt;
&lt;div&gt;Finish the initial camera functionality (sprite-following, defined bounds, and defined viewports -- leading to multiple cameras in a GameSpace and &amp;quot;split screens&amp;quot; ... &lt;em&gt;btw: thanks once again to the &lt;/em&gt;&lt;a class="" title="XNA Machine Blog" href="http://xnamachine.blogspot.com/2008/02/2d-scenecamera-near-completion.html"&gt;&lt;em&gt;XNA Machine Blog&lt;/em&gt;&lt;/a&gt;&lt;em&gt;&amp;nbsp;who is taking a slightly different approach to similar terrain -- and that&amp;#39;s helping me see things in new ways as well&lt;/em&gt;)&lt;/div&gt;&lt;/li&gt;&lt;/ul&gt;
&lt;p&gt;Once I get that far, I should be ready to compile a quick demo on how the camera and sprite basics work.&lt;/p&gt;
&lt;p&gt;But I wanted to be sure to touch upon a couple units-of-measure that I will be using throughout the library ... and since I don&amp;#39;t have something productive to show from my code at this point, I figured now might be as good a point as any. ;-)&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;&lt;u&gt;Angles In Degrees&lt;/u&gt;&lt;/strong&gt; -- I prefer my angles to be measured in degrees.&amp;nbsp; Something about my old-fashioned American math training just won&amp;#39;t let go of me ... so, I like my circles to start at 0 degrees at top, increase in a clockwise fashion -- 90 degrees is to the right, 180 degrees is down -- until you end up at the top again at 360 degrees.&amp;nbsp; So, if you see a property or function that is returning an angle (names like &amp;quot;Heading&amp;quot;, &amp;quot;Facing&amp;quot;, &amp;quot;Aiming&amp;quot;, &amp;quot;GetAngle&amp;quot;, etc.), it will be in degrees.&amp;nbsp; However, for properties, I will likely have an equivalently named property with a &amp;quot;_InRadians&amp;quot; suffix (such as &amp;quot;Heading_InRadians&amp;quot;) to give something to work with if someone wants to use Windows functions that prefer radians.&amp;nbsp; The &amp;quot;QuickTrig&amp;quot; helper functions in &lt;em&gt;Nimble2D&lt;/em&gt; operate in degrees -- so, making use of those is very easy with this degrees-friendly approach.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;&lt;u&gt;Time in Seconds&lt;/u&gt;&lt;/strong&gt; --&amp;nbsp;I&amp;#39;ve found it traditional for game programmers to deal with time in milliseconds, for a number of different reasons.&amp;nbsp; However, I&amp;#39;ve found over time that I always need to convert those into true seconds to do things related to time-based programming (X = X + VX * (DeltaMS / 1000), etc.).&amp;nbsp; So, with this library, I&amp;#39;ve decided to always deal in actual seconds ...&amp;nbsp;usually of type Double.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;&lt;u&gt;Space Measurements in &amp;quot;GameSpace Pixels&amp;quot;&lt;/u&gt;&lt;/strong&gt; -- Position and spacial measurements will essentially still be in pixels, with the normal caviats thrown in when dealing with current 3D programming: It&amp;#39;s a pixel if everything is at a 1.0 scale.&amp;nbsp; And everything will be relative to each other within the GameSpace ... so, basically, the camera&amp;#39;s position will determine what will be showing up on screen.&amp;nbsp; Having a position of (800, -16372) may be in the middle of the screen, if the camera is moved into the right place ... and something at (805, -16372) will be 5 pixels to the right of the first object, assuming a scale of 1.0.&amp;nbsp; When I combine these two things, I like to think of these units as &amp;quot;GameSpace Pixels&amp;quot;, as it reminds me of the relativity between all things within the GameSpace.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;&lt;u&gt;Rates are &amp;quot;per Second&amp;quot;&lt;/u&gt;&lt;/strong&gt; -- Any rate-style measurement -- &amp;quot;Linear Speed&amp;quot;, &amp;quot;Acceleration&amp;quot;, &amp;quot;Rotational Speed&amp;quot;, &amp;quot;Alpha Fade Rate&amp;quot;, etc. -- will be in a &amp;quot;per second&amp;quot; format.&amp;nbsp; Linear Speed, for example, is in &amp;quot;GameSpace Pixels per Second&amp;quot; ... Acceleration is &amp;quot;GameSpace Pixels per Second per Second&amp;quot; ... Rotational Speed is &amp;quot;Degrees per Second&amp;quot; ... Alpha Fade Rate is in &amp;quot;Values per Second&amp;quot; (where a &amp;quot;value&amp;quot; is each&amp;nbsp;integer in the 0-to-255 range).&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;&lt;u&gt;&amp;quot;ColorOnly&amp;quot; versus &amp;quot;Color&amp;quot;&lt;/u&gt;&lt;/strong&gt; -- There are times when I like to separate the Alpha channel out by itself from the rest of what would normally be an ARGB-style System.Drawing.Color.&amp;nbsp; Also, there are cases (such as background color) where the Alpha channel just doesn&amp;#39;t matter.&amp;nbsp; As an example of the former, sprites will have a &amp;quot;SpriteAlpha&amp;quot; property that can hold a value of 0 (completely transparent) to 255 (completely opaque) and a separate &amp;quot;SpriteColorOnly&amp;quot; that, while still being of type System.Drawing.Color, will only make use of the Red, Green, and Blue channels to color-shade the sprite.&amp;nbsp; If something contains just the word &amp;quot;Color&amp;quot; (and not the &amp;quot;Only&amp;quot;), then all 4 channels will be used for whatever purpose that property or function is up to.&lt;/p&gt;
&lt;p&gt;Those are the main ones that I&amp;#39;ve run into so far ... I&amp;#39;m sure there will be more, so I reserve the right to re-visit this topic (and maybe even change what&amp;#39;s been stated here). ;-)&lt;/p&gt;
&lt;p&gt;-Matt&lt;/p&gt;&lt;img src="http://ilovevb.net/Web/aggbug.aspx?PostID=103" width="1" height="1"&gt;</description><category domain="http://ilovevb.net/Web/blogs/nimble2d/archive/tags/NimbleOverview/default.aspx">NimbleOverview</category><category domain="http://ilovevb.net/Web/blogs/nimble2d/archive/tags/KudosToOthers/default.aspx">KudosToOthers</category><category domain="http://ilovevb.net/Web/blogs/nimble2d/archive/tags/Nimble2D/default.aspx">Nimble2D</category></item><item><title>New HA! Release (0.1.6f)</title><link>http://ilovevb.net/Web/blogs/heroicadventure/archive/2008/02/19/new-ha-release-0-1-6f.aspx</link><pubDate>Tue, 19 Feb 2008 20:41:00 GMT</pubDate><guid isPermaLink="false">f079997d-67b3-4d49-aaea-86507d683840:102</guid><dc:creator>admin</dc:creator><slash:comments>0</slash:comments><description>&lt;p&gt;Sorry about the long wait, but I finally pushed a working build onto the Codeplex site.&amp;nbsp;(You can get there via &lt;a href="http://www.heroicadventure.com/"&gt;http://www.heroicadventure.com&lt;/a&gt;)&lt;/p&gt;
&lt;p&gt;Heroic Adventure 0.1.6f is purely a bugfix release but I&amp;#39;m happy to say that I have renewed interest in working on HA! after a very long and frustrating break.&amp;nbsp; I&amp;#39;ve already started on some very in demand features, including better LOS code, ranged combat, spellcasting and the ability to examine the world around you.&lt;/p&gt;
&lt;p&gt;Stay tuned.&lt;/p&gt;&lt;img src="http://ilovevb.net/Web/aggbug.aspx?PostID=102" width="1" height="1"&gt;</description><category domain="http://ilovevb.net/Web/blogs/heroicadventure/archive/tags/HA_2100_/default.aspx">HA!</category><category domain="http://ilovevb.net/Web/blogs/heroicadventure/archive/tags/new+release/default.aspx">new release</category><category domain="http://ilovevb.net/Web/blogs/heroicadventure/archive/tags/combat/default.aspx">combat</category><category domain="http://ilovevb.net/Web/blogs/heroicadventure/archive/tags/LOS/default.aspx">LOS</category></item><item><title>A more random Random.</title><link>http://ilovevb.net/Web/blogs/heroicadventure/archive/2008/02/19/a-more-random-random.aspx</link><pubDate>Tue, 19 Feb 2008 20:27:00 GMT</pubDate><guid isPermaLink="false">f079997d-67b3-4d49-aaea-86507d683840:101</guid><dc:creator>admin</dc:creator><slash:comments>0</slash:comments><description>&lt;p&gt;This is the random number generator we use in HA!&amp;nbsp; It&amp;#39;s a much truer Random than System.Random.&amp;nbsp; It&amp;#39;s slower, but not as slow as the Crypto Random. &lt;/p&gt;
&lt;p&gt;Converted from C by Paul Vick, initially for use in Heroic Adventure.&amp;nbsp; Thanks Paul!&amp;nbsp;&lt;/p&gt;
&lt;p&gt;For more information about the Mersenne Twister and the concepts behind it, I encourage you to read &lt;a class="" href="http://en.wikipedia.org/wiki/Mersenne_twister"&gt;this Wikipedia article&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;To save some cut &amp;amp; paste heartache, I&amp;#39;ve attached the source file to this post. Be sure to grab it:&amp;nbsp; &lt;a class="" href="http://ilovevb.net/Web/blogs/heroicadventure/attachment/101.ashx"&gt;MersenneTwister.vb&lt;/a&gt;&lt;/p&gt;&lt;font color="#008000" size="4"&gt;
&lt;p&gt;&amp;#39;&lt;br /&gt;&amp;#39; An implementation of the Mersenne Twister algorithm (MT19937), developed&lt;br /&gt;&amp;#39; with reference to the C code written by Takuji Nishimura and Makoto Matsumoto&lt;br /&gt;&amp;#39; (&lt;a href="http://www.math.sci.hiroshima-u.ac.jp/~m-mat/MT/emt.html"&gt;http://www.math.sci.hiroshima-u.ac.jp/~m-mat/MT/emt.html&lt;/a&gt;).&lt;br /&gt;&amp;#39;&lt;br /&gt;&amp;#39; This code is free to use for any pupose.&lt;br /&gt;&amp;#39;&lt;/p&gt;&lt;/font&gt;&lt;font color="#0000ff" size="4"&gt;
&lt;p&gt;Option&lt;/font&gt;&lt;font size="4"&gt; &lt;/font&gt;&lt;font color="#0000ff" size="4"&gt;Strict&lt;/font&gt;&lt;font size="4"&gt; &lt;/font&gt;&lt;font color="#0000ff" size="4"&gt;On&lt;/p&gt;&lt;/font&gt;&lt;font color="#008000" size="4"&gt;&amp;#39;&amp;#39;&amp;#39; &lt;br /&gt;&amp;#39;&amp;#39;&amp;#39; A random number generator with a uniform distribution using the Mersenne &lt;br /&gt;&amp;#39;&amp;#39;&amp;#39; Twister algorithm.&lt;br /&gt;&amp;#39;&amp;#39;&amp;#39; &lt;br /&gt;&lt;/font&gt;&lt;font color="#0000ff" size="4"&gt;Public&lt;/font&gt;&lt;font size="4"&gt; &lt;/font&gt;&lt;font color="#0000ff" size="4"&gt;Class&lt;/font&gt;&lt;font size="4"&gt; MersenneTwister&lt;/font&gt;&lt;/font&gt;&lt;font size="4"&gt; 
&lt;blockquote&gt;
&lt;p&gt;&lt;/font&gt;&lt;font color="#0000ff" size="4"&gt;Private&lt;/font&gt;&lt;font size="4"&gt; &lt;/font&gt;&lt;font color="#0000ff" size="4"&gt;Const&lt;/font&gt;&lt;font size="4"&gt; N &lt;/font&gt;&lt;font color="#0000ff" size="4"&gt;As&lt;/font&gt;&lt;font size="4"&gt; &lt;/font&gt;&lt;font color="#0000ff" size="4"&gt;Integer&lt;/font&gt;&lt;font size="4"&gt; = 624&lt;br /&gt;&lt;/font&gt;&lt;font color="#0000ff" size="4"&gt;Private&lt;/font&gt;&lt;font size="4"&gt; &lt;/font&gt;&lt;font color="#0000ff" size="4"&gt;Const&lt;/font&gt;&lt;font size="4"&gt; M &lt;/font&gt;&lt;font color="#0000ff" size="4"&gt;As&lt;/font&gt;&lt;font size="4"&gt; &lt;/font&gt;&lt;font color="#0000ff" size="4"&gt;Integer&lt;/font&gt;&lt;font size="4"&gt; = 397&lt;br /&gt;&lt;/font&gt;&lt;font color="#0000ff" size="4"&gt;Private&lt;/font&gt;&lt;font size="4"&gt; &lt;/font&gt;&lt;font color="#0000ff" size="4"&gt;Const&lt;/font&gt;&lt;font size="4"&gt; MATRIX_A &lt;/font&gt;&lt;font color="#0000ff" size="4"&gt;As&lt;/font&gt;&lt;font size="4"&gt; &lt;/font&gt;&lt;font color="#0000ff" size="4"&gt;UInteger&lt;/font&gt;&lt;font size="4"&gt; = &amp;amp;H9908B0DFUI&lt;br /&gt;&lt;/font&gt;&lt;font color="#0000ff" size="4"&gt;Private&lt;/font&gt;&lt;font size="4"&gt; &lt;/font&gt;&lt;font color="#0000ff" size="4"&gt;Const&lt;/font&gt;&lt;font size="4"&gt; UPPER_MASK &lt;/font&gt;&lt;font color="#0000ff" size="4"&gt;As&lt;/font&gt;&lt;font size="4"&gt; &lt;/font&gt;&lt;font color="#0000ff" size="4"&gt;UInteger&lt;/font&gt;&lt;font size="4"&gt; = &amp;amp;H80000000UI&lt;br /&gt;&lt;/font&gt;&lt;font color="#0000ff" size="4"&gt;Private&lt;/font&gt;&lt;font size="4"&gt; &lt;/font&gt;&lt;font color="#0000ff" size="4"&gt;Const&lt;/font&gt;&lt;font size="4"&gt; LOWER_MASK &lt;/font&gt;&lt;font color="#0000ff" size="4"&gt;As&lt;/font&gt;&lt;font size="4"&gt; &lt;/font&gt;&lt;font color="#0000ff" size="4"&gt;UInteger&lt;/font&gt;&lt;font size="4"&gt; = &amp;amp;H7FFFFFFFUI&lt;/p&gt;&lt;/font&gt;&lt;font color="#0000ff" size="4"&gt;Private&lt;/font&gt;&lt;font size="4"&gt; mt(N - 1) &lt;/font&gt;&lt;font color="#0000ff" size="4"&gt;As&lt;/font&gt;&lt;font size="4"&gt; &lt;/font&gt;&lt;font color="#0000ff" size="4"&gt;UInteger&lt;br /&gt;&lt;/font&gt;&lt;font color="#0000ff" size="4"&gt;Private&lt;/font&gt;&lt;font size="4"&gt; mti &lt;/font&gt;&lt;font color="#0000ff" size="4"&gt;As&lt;/font&gt;&lt;font size="4"&gt; &lt;/font&gt;&lt;font color="#0000ff" size="4"&gt;Integer&lt;/font&gt;&lt;font size="4"&gt; = N + 1&lt;/font&gt;&lt;/font&gt;&lt;font size="4"&gt; 
&lt;p&gt;&lt;/font&gt;&lt;font color="#008000" size="4"&gt;&amp;#39;&amp;#39;&amp;#39; &lt;/font&gt;&lt;font color="#808080" size="4"&gt;&amp;lt;summary&amp;gt;&lt;br /&gt;&lt;/font&gt;&lt;font color="#008000" size="4"&gt;&amp;#39;&amp;#39;&amp;#39; Create a new Mersenne Twister random number generator.&lt;br /&gt;&lt;/font&gt;&lt;font color="#008000" size="4"&gt;&amp;#39;&amp;#39;&amp;#39; &lt;/font&gt;&lt;font color="#808080" size="4"&gt;&amp;lt;/summary&amp;gt;&lt;br /&gt;&lt;/font&gt;&lt;font color="#0000ff" size="4"&gt;Public&lt;/font&gt;&lt;font size="4"&gt; &lt;/font&gt;&lt;font color="#0000ff" size="4"&gt;Sub&lt;/font&gt;&lt;font size="4"&gt; &lt;/font&gt;&lt;font color="#0000ff" size="4"&gt;New&lt;/font&gt;&lt;font size="4"&gt;()&lt;br /&gt;&lt;/font&gt;&lt;font color="#0000ff" size="4"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Me&lt;/font&gt;&lt;font size="4"&gt;.New(&lt;/font&gt;&lt;font color="#0000ff" size="4"&gt;CUInt&lt;/font&gt;&lt;font size="4"&gt;(&lt;/font&gt;&lt;font color="#0000ff" size="4"&gt;Date&lt;/font&gt;&lt;font size="4"&gt;.Now.Millisecond))&lt;br /&gt;&lt;/font&gt;&lt;font color="#0000ff" size="4"&gt;End&lt;/font&gt;&lt;font size="4"&gt; &lt;/font&gt;&lt;font color="#0000ff" size="4"&gt;Sub&lt;/p&gt;&lt;/blockquote&gt;&lt;/font&gt;&lt;font size="4"&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;/font&gt;&lt;font color="#008000" size="4"&gt;&amp;#39;&amp;#39;&amp;#39; &lt;/font&gt;&lt;font color="#808080" size="4"&gt;&amp;lt;summary&amp;gt;&lt;br /&gt;&lt;/font&gt;&lt;font color="#008000" size="4"&gt;&amp;#39;&amp;#39;&amp;#39; Create a new Mersenne Twister random number generator with a&lt;br /&gt;&lt;/font&gt;&lt;font color="#008000" size="4"&gt;&amp;#39;&amp;#39;&amp;#39; particular seed.&lt;br /&gt;&lt;/font&gt;&lt;font color="#008000" size="4"&gt;&amp;#39;&amp;#39;&amp;#39; &lt;/font&gt;&lt;font color="#808080" size="4"&gt;&amp;lt;/summary&amp;gt;&lt;br /&gt;&lt;/font&gt;&lt;font color="#008000" size="4"&gt;&amp;#39;&amp;#39;&amp;#39; &lt;/font&gt;&lt;font color="#808080" size="4"&gt;&amp;lt;param name=&amp;quot;seed&amp;quot;&amp;gt;&lt;/font&gt;&lt;font color="#008000" size="4"&gt;The seed for the generator.&lt;/font&gt;&lt;font color="#808080" size="4"&gt;&amp;lt;/param&amp;gt;&lt;br /&gt;&lt;/font&gt;&lt;font size="4"&gt;&amp;lt;CLSCompliant(&lt;/font&gt;&lt;font color="#0000ff" size="4"&gt;False&lt;/font&gt;&lt;font size="4"&gt;)&amp;gt; _&lt;br /&gt;&lt;/font&gt;&lt;font color="#0000ff" size="4"&gt;Public&lt;/font&gt;&lt;font size="4"&gt; &lt;/font&gt;&lt;font color="#0000ff" size="4"&gt;Sub&lt;/font&gt;&lt;font size="4"&gt; &lt;/font&gt;&lt;font color="#0000ff" size="4"&gt;New&lt;/font&gt;&lt;font size="4"&gt;(&lt;/font&gt;&lt;font color="#0000ff" size="4"&gt;ByVal&lt;/font&gt;&lt;font size="4"&gt; seed &lt;/font&gt;&lt;font color="#0000ff" size="4"&gt;As&lt;/font&gt;&lt;font size="4"&gt; &lt;/font&gt;&lt;font color="#0000ff" size="4"&gt;UInteger&lt;/font&gt;&lt;font size="4"&gt;)&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; mt(0) = seed&lt;br /&gt;&lt;/font&gt;&lt;font color="#0000ff" size="4"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; For&lt;/font&gt;&lt;font size="4"&gt; mti = 1 &lt;/font&gt;&lt;font color="#0000ff" size="4"&gt;To&lt;/font&gt;&lt;font size="4"&gt; N - 1&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; mt(mti) = &lt;/font&gt;&lt;font color="#0000ff" size="4"&gt;CUInt&lt;/font&gt;&lt;font size="4"&gt;((1812433253UL * (mt(mti - 1) &lt;/font&gt;&lt;font color="#0000ff" size="4"&gt;Xor&lt;/font&gt;&lt;font size="4"&gt; (mt(mti - 1) &amp;gt;&amp;gt; 30)) + &lt;/font&gt;&lt;font color="#0000ff" size="4"&gt;CUInt&lt;/font&gt;&lt;font size="4"&gt;(mti)) &lt;/font&gt;&lt;font color="#0000ff" size="4"&gt;And&lt;/font&gt;&lt;font size="4"&gt; &amp;amp;HFFFFFFFFUL)&lt;br /&gt;&lt;/font&gt;&lt;font color="#0000ff" size="4"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Next&lt;br /&gt;&lt;/font&gt;&lt;font color="#0000ff" size="4"&gt;End&lt;/font&gt;&lt;font size="4"&gt; &lt;/font&gt;&lt;font color="#0000ff" size="4"&gt;Sub&lt;/p&gt;&lt;/blockquote&gt;&lt;/font&gt;&lt;font size="4"&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;/font&gt;&lt;font color="#008000" size="4"&gt;&amp;#39;&amp;#39;&amp;#39; &lt;/font&gt;&lt;font color="#808080" size="4"&gt;&amp;lt;summary&amp;gt;&lt;br /&gt;&lt;/font&gt;&lt;font color="#008000" size="4"&gt;&amp;#39;&amp;#39;&amp;#39; Create a new Mersenne Twister random number generator with a&lt;br /&gt;&lt;/font&gt;&lt;font color="#008000" size="4"&gt;&amp;#39;&amp;#39;&amp;#39; particular initial key.&lt;br /&gt;&lt;/font&gt;&lt;font color="#008000" size="4"&gt;&amp;#39;&amp;#39;&amp;#39; &lt;/font&gt;&lt;font color="#808080" size="4"&gt;&amp;lt;/summary&amp;gt;&lt;br /&gt;&lt;/font&gt;&lt;font color="#008000" size="4"&gt;&amp;#39;&amp;#39;&amp;#39; &lt;/font&gt;&lt;font color="#808080" size="4"&gt;&amp;lt;param name=&amp;quot;initialKey&amp;quot;&amp;gt;&lt;/font&gt;&lt;font color="#008000" size="4"&gt;The initial key.&lt;/font&gt;&lt;font color="#808080" size="4"&gt;&amp;lt;/param&amp;gt;&lt;br /&gt;&lt;/font&gt;&lt;font size="4"&gt;&amp;lt;CLSCompliant(&lt;/font&gt;&lt;font color="#0000ff" size="4"&gt;False&lt;/font&gt;&lt;font size="4"&gt;)&amp;gt; _&lt;br /&gt;&lt;/font&gt;&lt;font color="#0000ff" size="4"&gt;Public&lt;/font&gt;&lt;font size="4"&gt; &lt;/font&gt;&lt;font color="#0000ff" size="4"&gt;Sub&lt;/font&gt;&lt;font size="4"&gt; &lt;/font&gt;&lt;font color="#0000ff" size="4"&gt;New&lt;/font&gt;&lt;font size="4"&gt;(&lt;/font&gt;&lt;font color="#0000ff" size="4"&gt;ByVal&lt;/font&gt;&lt;font size="4"&gt; initialKey() &lt;/font&gt;&lt;font color="#0000ff" size="4"&gt;As&lt;/font&gt;&lt;font size="4"&gt; &lt;/font&gt;&lt;font color="#0000ff" size="4"&gt;UInteger&lt;/font&gt;&lt;font size="4"&gt;)&lt;br /&gt;&lt;/font&gt;&lt;font color="#0000ff" size="4"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Me&lt;/font&gt;&lt;font size="4"&gt;.New(19650218UI)&lt;br /&gt;&lt;/font&gt;&lt;font color="#0000ff" size="4"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim&lt;/font&gt;&lt;font size="4"&gt; i, j, k &lt;/font&gt;&lt;font color="#0000ff" size="4"&gt;As&lt;/font&gt;&lt;font size="4"&gt; &lt;/font&gt;&lt;font color="#0000ff" size="4"&gt;Integer&lt;br /&gt;&lt;/font&gt;&lt;font size="4"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; i = 1 : j = 0&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; k = &lt;/font&gt;&lt;font color="#0000ff" size="4"&gt;CInt&lt;/font&gt;&lt;font size="4"&gt;(IIf(N &amp;gt; initialKey.Length, N, initialKey.Length))&lt;br /&gt;&lt;/font&gt;&lt;font color="#0000ff" size="4"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; For&lt;/font&gt;&lt;font size="4"&gt; k = k &lt;/font&gt;&lt;font color="#0000ff" size="4"&gt;To&lt;/font&gt;&lt;font size="4"&gt; 1 &lt;/font&gt;&lt;font color="#0000ff" size="4"&gt;Step&lt;/font&gt;&lt;font size="4"&gt; -1&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; mt(i) = &lt;/font&gt;&lt;font color="#0000ff" size="4"&gt;CUInt&lt;/font&gt;&lt;font size="4"&gt;(((mt(i) &lt;/font&gt;&lt;font color="#0000ff" size="4"&gt;Xor&lt;/font&gt;&lt;font size="4"&gt; ((mt(i - 1) &lt;/font&gt;&lt;font color="#0000ff" size="4"&gt;Xor&lt;/font&gt;&lt;font size="4"&gt; (mt(i - 1) &amp;gt;&amp;gt; 30)) * 1664525UL)) + initialKey(j) + &lt;/font&gt;&lt;font color="#0000ff" size="4"&gt;CUInt&lt;/font&gt;&lt;font size="4"&gt;(j)) &lt;/font&gt;&lt;font color="#0000ff" size="4"&gt;And&lt;/font&gt;&lt;font size="4"&gt; &amp;amp;HFFFFFFFFUI)&lt;br /&gt;&lt;/font&gt;&lt;font size="4"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; i += 1 : j += 1&lt;br /&gt;&lt;/font&gt;&lt;font color="#0000ff" size="4"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; If&lt;/font&gt;&lt;font size="4"&gt; i &amp;gt;= N &lt;/font&gt;&lt;font color="#0000ff" size="4"&gt;Then&lt;/font&gt;&lt;font size="4"&gt; mt(0) = mt(N - 1) : i = 1&lt;br /&gt;&lt;/font&gt;&lt;font color="#0000ff" size="4"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; If&lt;/font&gt;&lt;font size="4"&gt; j &amp;gt;= initialKey.Length &lt;/font&gt;&lt;font color="#0000ff" size="4"&gt;Then&lt;/font&gt;&lt;font size="4"&gt; j = 0&lt;br /&gt;&lt;/font&gt;&lt;font color="#0000ff" size="4"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Next&lt;br /&gt;&lt;/font&gt;&lt;font color="#0000ff" size="4"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; For&lt;/font&gt;&lt;font size="4"&gt; k = N - 1 &lt;/font&gt;&lt;font color="#0000ff" size="4"&gt;To&lt;/font&gt;&lt;font size="4"&gt; 1 &lt;/font&gt;&lt;font color="#0000ff" size="4"&gt;Step&lt;/font&gt;&lt;font size="4"&gt; -1&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; mt(i) = &lt;/font&gt;&lt;font color="#0000ff" size="4"&gt;CUInt&lt;/font&gt;&lt;font size="4"&gt;(((mt(i) &lt;/font&gt;&lt;font color="#0000ff" size="4"&gt;Xor&lt;/font&gt;&lt;font size="4"&gt; ((mt(i - 1) &lt;/font&gt;&lt;font color="#0000ff" size="4"&gt;Xor&lt;/font&gt;&lt;font size="4"&gt; (mt(i - 1) &amp;gt;&amp;gt; 30)) * 1566083941UL)) - &lt;/font&gt;&lt;font color="#0000ff" size="4"&gt;CUInt&lt;/font&gt;&lt;font size="4"&gt;(i)) &lt;/font&gt;&lt;font color="#0000ff" size="4"&gt;And&lt;/font&gt;&lt;font size="4"&gt; &amp;amp;HFFFFFFFFUI)&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; i += 1&lt;br /&gt;&lt;/font&gt;&lt;font color="#0000ff" size="4"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; If&lt;/font&gt;&lt;font size="4"&gt; i &amp;gt;= N &lt;/font&gt;&lt;font color="#0000ff" size="4"&gt;Then&lt;/font&gt;&lt;font size="4"&gt; mt(0) = mt(N - 1) : i = 1&lt;br /&gt;&lt;/font&gt;&lt;font color="#0000ff" size="4"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Next&lt;br /&gt;&lt;/font&gt;&lt;font size="4"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; mt(0) = &amp;amp;H80000000UI&lt;br /&gt;&lt;/font&gt;&lt;font color="#0000ff" size="4"&gt;End&lt;/font&gt;&lt;font size="4"&gt; &lt;/font&gt;&lt;font color="#0000ff" size="4"&gt;Sub&lt;/p&gt;&lt;/blockquote&gt;&lt;/font&gt;&lt;font size="4"&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;/font&gt;&lt;font color="#008000" size="4"&gt;&amp;#39;&amp;#39;&amp;#39; &lt;/font&gt;&lt;font color="#808080" size="4"&gt;&amp;lt;summary&amp;gt;&lt;br /&gt;&lt;/font&gt;&lt;font color="#008000" size="4"&gt;&amp;#39;&amp;#39;&amp;#39; Generates a random number between 0 and System.UInt32.MaxValue.&lt;br /&gt;&lt;/font&gt;&lt;font color="#008000" size="4"&gt;&amp;#39;&amp;#39;&amp;#39; &lt;/font&gt;&lt;font color="#808080" size="4"&gt;&amp;lt;/summary&amp;gt;&lt;br /&gt;&lt;/font&gt;&lt;font size="4"&gt;&amp;lt;CLSCompliant(&lt;/font&gt;&lt;font color="#0000ff" size="4"&gt;False&lt;/font&gt;&lt;font size="4"&gt;)&amp;gt; _&lt;br /&gt;&lt;/font&gt;&lt;font color="#0000ff" size="4"&gt;Public&lt;/font&gt;&lt;font size="4"&gt; &lt;/font&gt;&lt;font color="#0000ff" size="4"&gt;Function&lt;/font&gt;&lt;font size="4"&gt; NextUInt32() &lt;/font&gt;&lt;font color="#0000ff" size="4"&gt;As&lt;/font&gt;&lt;font size="4"&gt; &lt;/font&gt;&lt;font color="#0000ff" size="4"&gt;UInteger&lt;/font&gt;&lt;/p&gt;
&lt;blockquote&gt;&lt;font color="#0000ff" size="4"&gt;Dim&lt;/font&gt;&lt;font size="4"&gt; y &lt;/font&gt;&lt;font color="#0000ff" size="4"&gt;As&lt;/font&gt;&lt;font size="4"&gt; &lt;/font&gt;&lt;font color="#0000ff" size="4"&gt;UInteger&lt;br /&gt;&lt;/font&gt;&lt;font color="#0000ff" size="4"&gt;Static&lt;/font&gt;&lt;font size="4"&gt; mag01() &lt;/font&gt;&lt;font color="#0000ff" size="4"&gt;As&lt;/font&gt;&lt;font size="4"&gt; &lt;/font&gt;&lt;font color="#0000ff" size="4"&gt;UInteger&lt;/font&gt;&lt;font size="4"&gt; = {&amp;amp;H0UI, MATRIX_A}&lt;br /&gt;&lt;/font&gt;&lt;font color="#0000ff" size="4"&gt;If&lt;/font&gt;&lt;font size="4"&gt; mti &amp;gt;= N &lt;/font&gt;&lt;font color="#0000ff" size="4"&gt;Then&lt;br /&gt;&lt;/font&gt;&lt;font color="#0000ff" size="4"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim&lt;/font&gt;&lt;font size="4"&gt; kk &lt;/font&gt;&lt;font color="#0000ff" size="4"&gt;As&lt;/font&gt;&lt;font size="4"&gt; &lt;/font&gt;&lt;font color="#0000ff" size="4"&gt;Integer&lt;br /&gt;&lt;/font&gt;&lt;font size="4"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Debug.Assert(mti &amp;lt;&amp;gt; N + 1, &lt;/font&gt;&lt;font color="#a31515" size="4"&gt;&amp;quot;Failed initialization&amp;quot;&lt;/font&gt;&lt;font size="4"&gt;)&lt;br /&gt;&lt;/font&gt;&lt;font color="#0000ff" size="4"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; For&lt;/font&gt;&lt;font size="4"&gt; kk = 0 &lt;/font&gt;&lt;font color="#0000ff" size="4"&gt;To&lt;/font&gt;&lt;font size="4"&gt; N - M - 1&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; y = (mt(kk) &lt;/font&gt;&lt;font color="#0000ff" size="4"&gt;And&lt;/font&gt;&lt;font size="4"&gt; UPPER_MASK) &lt;/font&gt;&lt;font color="#0000ff" size="4"&gt;Or&lt;/font&gt;&lt;font size="4"&gt; (mt(kk + 1) &lt;/font&gt;&lt;font color="#0000ff" size="4"&gt;And&lt;/font&gt;&lt;font size="4"&gt; LOWER_MASK)&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; mt(kk) = mt(kk + M) &lt;/font&gt;&lt;font color="#0000ff" size="4"&gt;Xor&lt;/font&gt;&lt;font size="4"&gt; (y &amp;gt;&amp;gt; 1) &lt;/font&gt;&lt;font color="#0000ff" size="4"&gt;Xor&lt;/font&gt;&lt;font size="4"&gt; mag01(&lt;/font&gt;&lt;font color="#0000ff" size="4"&gt;CInt&lt;/font&gt;&lt;font size="4"&gt;(y &lt;/font&gt;&lt;font color="#0000ff" size="4"&gt;And&lt;/font&gt;&lt;font size="4"&gt; &amp;amp;H1))&lt;br /&gt;&lt;/font&gt;&lt;font color="#0000ff" size="4"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Next&lt;br /&gt;&lt;/font&gt;&lt;font color="#0000ff" size="4"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; For&lt;/font&gt;&lt;font size="4"&gt; kk = kk &lt;/font&gt;&lt;font color="#0000ff" size="4"&gt;To&lt;/font&gt;&lt;font size="4"&gt; N - 2&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; y = (mt(kk) &lt;/font&gt;&lt;font color="#0000ff" size="4"&gt;And&lt;/font&gt;&lt;font size="4"&gt; UPPER_MASK) &lt;/font&gt;&lt;font color="#0000ff" size="4"&gt;Or&lt;/font&gt;&lt;font size="4"&gt; (mt(kk + 1) &lt;/font&gt;&lt;font color="#0000ff" size="4"&gt;And&lt;/font&gt;&lt;font size="4"&gt; LOWER_MASK)&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; mt(kk) = mt(kk + (M - N)) &lt;/font&gt;&lt;font color="#0000ff" size="4"&gt;Xor&lt;/font&gt;&lt;font size="4"&gt; (y &amp;gt;&amp;gt; 1) &lt;/font&gt;&lt;font color="#0000ff" size="4"&gt;Xor&lt;/font&gt;&lt;font size="4"&gt; mag01(&lt;/font&gt;&lt;font color="#0000ff" size="4"&gt;CInt&lt;/font&gt;&lt;font size="4"&gt;(y &lt;/font&gt;&lt;font color="#0000ff" size="4"&gt;And&lt;/font&gt;&lt;font size="4"&gt; &amp;amp;H1))&lt;br /&gt;&lt;/font&gt;&lt;font color="#0000ff" size="4"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Next&lt;br /&gt;&lt;/font&gt;&lt;font size="4"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; y = (mt(N - 1) &lt;/font&gt;&lt;font color="#0000ff" size="4"&gt;And&lt;/font&gt;&lt;font size="4"&gt; UPPER_MASK) &lt;/font&gt;&lt;font color="#0000ff" size="4"&gt;Or&lt;/font&gt;&lt;font size="4"&gt; (mt(0) &lt;/font&gt;&lt;font color="#0000ff" size="4"&gt;And&lt;/font&gt;&lt;font size="4"&gt; LOWER_MASK)&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; mt(N - 1) = mt(M - 1) &lt;/font&gt;&lt;font color="#0000ff" size="4"&gt;Xor&lt;/font&gt;&lt;font size="4"&gt; (y &amp;gt;&amp;gt; 1) &lt;/font&gt;&lt;font color="#0000ff" size="4"&gt;Xor&lt;/font&gt;&lt;font size="4"&gt; mag01(&lt;/font&gt;&lt;font color="#0000ff" size="4"&gt;CInt&lt;/font&gt;&lt;font size="4"&gt;(y &lt;/font&gt;&lt;font color="#0000ff" size="4"&gt;And&lt;/font&gt;&lt;font size="4"&gt; &amp;amp;H1))&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; mti = 0&lt;br /&gt;&lt;/font&gt;&lt;font color="#0000ff" size="4"&gt;End&lt;/font&gt;&lt;font size="4"&gt; &lt;/font&gt;&lt;font color="#0000ff" size="4"&gt;If&lt;br /&gt;&lt;/font&gt;&lt;font size="4"&gt;y = mt(mti)&lt;br /&gt;mti += 1&lt;/font&gt;&lt;font size="4"&gt;&lt;/blockquote&gt;
&lt;blockquote&gt;&lt;/font&gt;&lt;font color="#008000" size="4"&gt;&amp;#39; Tempering&lt;br /&gt;&lt;/font&gt;&lt;font size="4"&gt;y = y &lt;/font&gt;&lt;font color="#0000ff" size="4"&gt;Xor&lt;/font&gt;&lt;font size="4"&gt; (y &amp;gt;&amp;gt; 11)&lt;br /&gt;y = y &lt;/font&gt;&lt;font color="#0000ff" size="4"&gt;Xor&lt;/font&gt;&lt;font size="4"&gt; ((y &amp;lt;&amp;lt; 7) &lt;/font&gt;&lt;font color="#0000ff" size="4"&gt;And&lt;/font&gt;&lt;font size="4"&gt; &amp;amp;H9D2C5680UI)&lt;br /&gt;y = y &lt;/font&gt;&lt;font color="#0000ff" size="4"&gt;Xor&lt;/font&gt;&lt;font size="4"&gt; ((y &amp;lt;&amp;lt; 15) &lt;/font&gt;&lt;font color="#0000ff" size="4"&gt;And&lt;/font&gt;&lt;font size="4"&gt; &amp;amp;HEFC60000UI)&lt;br /&gt;y = y &lt;/font&gt;&lt;font color="#0000ff" size="4"&gt;Xor&lt;/font&gt;&lt;font size="4"&gt; (y &amp;gt;&amp;gt; 18)&lt;br /&gt;&lt;/font&gt;&lt;font color="#0000ff" size="4"&gt;Return&lt;/font&gt;&lt;font size="4"&gt; y&lt;/font&gt;&lt;/font&gt;&lt;font size="4"&gt;&lt;/blockquote&gt;
&lt;p&gt;&lt;/font&gt;&lt;font color="#0000ff" size="4"&gt;End&lt;/font&gt;&lt;font size="4"&gt; &lt;/font&gt;&lt;font color="#0000ff" size="4"&gt;Function&lt;/p&gt;&lt;/blockquote&gt;&lt;/font&gt;&lt;font size="4"&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;/font&gt;&lt;font color="#008000" size="4"&gt;&amp;#39;&amp;#39;&amp;#39; &lt;/font&gt;&lt;font color="#808080" size="4"&gt;&amp;lt;summary&amp;gt;&lt;br /&gt;&lt;/font&gt;&lt;font color="#008000" size="4"&gt;&amp;#39;&amp;#39;&amp;#39; Generates a random integer between 0 and System.Int32.MaxValue.&lt;br /&gt;&lt;/font&gt;&lt;font color="#008000" size="4"&gt;&amp;#39;&amp;#39;&amp;#39; &lt;/font&gt;&lt;font color="#808080" size="4"&gt;&amp;lt;/summary&amp;gt;&lt;br /&gt;&lt;/font&gt;&lt;font color="#0000ff" size="4"&gt;Public&lt;/font&gt;&lt;font size="4"&gt; &lt;/font&gt;&lt;font color="#0000ff" size="4"&gt;Function&lt;/font&gt;&lt;font size="4"&gt; [Next]() &lt;/font&gt;&lt;font color="#0000ff" size="4"&gt;As&lt;/font&gt;&lt;font size="4"&gt; &lt;/font&gt;&lt;font color="#0000ff" size="4"&gt;Integer&lt;br /&gt;&lt;/font&gt;&lt;font color="#0000ff" size="4"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Return&lt;/font&gt;&lt;font size="4"&gt; &lt;/font&gt;&lt;font color="#0000ff" size="4"&gt;CInt&lt;/font&gt;&lt;font size="4"&gt;(NextUInt32() &amp;gt;&amp;gt; 1)&lt;br /&gt;&lt;/font&gt;&lt;font color="#0000ff" size="4"&gt;End&lt;/font&gt;&lt;font size="4"&gt; &lt;/font&gt;&lt;font color="#0000ff" size="4"&gt;Function&lt;/p&gt;&lt;/font&gt;&lt;font size="4"&gt;
&lt;p&gt;&lt;/font&gt;&lt;font color="#008000" size="4"&gt;&amp;#39;&amp;#39;&amp;#39; &lt;/font&gt;&lt;font color="#808080" size="4"&gt;&amp;lt;summary&amp;gt;&lt;br /&gt;&lt;/font&gt;&lt;font color="#008000" size="4"&gt;&amp;#39;&amp;#39;&amp;#39; Generates a random integer between 0 and maxValue.&lt;br /&gt;&lt;/font&gt;&lt;font color="#008000" size="4"&gt;&amp;#39;&amp;#39;&amp;#39; &lt;/font&gt;&lt;font color="#808080" size="4"&gt;&amp;lt;/summary&amp;gt;&lt;br /&gt;&lt;/font&gt;&lt;font color="#008000" size="4"&gt;&amp;#39;&amp;#39;&amp;#39; &lt;/font&gt;&lt;font color="#808080" size="4"&gt;&amp;lt;param name=&amp;quot;maxValue&amp;quot;&amp;gt;&lt;/font&gt;&lt;font color="#008000" size="4"&gt;The maximum value. Must be greater than zero.&lt;/font&gt;&lt;font color="#808080" size="4"&gt;&amp;lt;/param&amp;gt;&lt;br /&gt;&lt;/font&gt;&lt;font color="#0000ff" size="4"&gt;Public&lt;/font&gt;&lt;font size="4"&gt; &lt;/font&gt;&lt;font color="#0000ff" size="4"&gt;Function&lt;/font&gt;&lt;font size="4"&gt; [Next](&lt;/font&gt;&lt;font color="#0000ff" size="4"&gt;ByVal&lt;/font&gt;&lt;font size="4"&gt; maxValue &lt;/font&gt;&lt;font color="#0000ff" size="4"&gt;As&lt;/font&gt;&lt;font size="4"&gt; &lt;/font&gt;&lt;font color="#0000ff" size="4"&gt;Integer&lt;/font&gt;&lt;font size="4"&gt;) &lt;/font&gt;&lt;font color="#0000ff" size="4"&gt;As&lt;/font&gt;&lt;font size="4"&gt; &lt;/font&gt;&lt;font color="#0000ff" size="4"&gt;Integer&lt;br /&gt;&lt;/font&gt;&lt;font color="#0000ff" size="4"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Return&lt;/font&gt;&lt;font size="4"&gt; [Next](0, maxValue)&lt;br /&gt;&lt;/font&gt;&lt;font color="#0000ff" size="4"&gt;End&lt;/font&gt;&lt;font size="4"&gt; &lt;/font&gt;&lt;font color="#0000ff" size="4"&gt;Function&lt;/p&gt;&lt;/font&gt;&lt;font size="4"&gt;
&lt;p&gt;&lt;/font&gt;&lt;font color="#008000" size="4"&gt;&amp;#39;&amp;#39;&amp;#39; &lt;/font&gt;&lt;font color="#808080" size="4"&gt;&amp;lt;summary&amp;gt;&lt;br /&gt;&lt;/font&gt;&lt;font color="#008000" size="4"&gt;&amp;#39;&amp;#39;&amp;#39; Generates a random integer between minValue and maxValue.&lt;br /&gt;&lt;/font&gt;&lt;font color="#008000" size="4"&gt;&amp;#39;&amp;#39;&amp;#39; &lt;/font&gt;&lt;font color="#808080" size="4"&gt;&amp;lt;/summary&amp;gt; &lt;br /&gt;&lt;/font&gt;&lt;font color="#008000" size="4"&gt;&amp;#39;&amp;#39;&amp;#39; &lt;/font&gt;&lt;font color="#808080" size="4"&gt;&amp;lt;param name=&amp;quot;maxValue&amp;quot;&amp;gt;&lt;/font&gt;&lt;font color="#008000" size="4"&gt;The lower bound.&lt;/font&gt;&lt;font color="#808080" size="4"&gt;&amp;lt;/param&amp;gt;&lt;br /&gt;&lt;/font&gt;&lt;font color="#008000" size="4"&gt;&amp;#39;&amp;#39;&amp;#39; &lt;/font&gt;&lt;font color="#808080" size="4"&gt;&amp;lt;param name=&amp;quot;minValue&amp;quot;&amp;gt;&lt;/font&gt;&lt;font color="#008000" size="4"&gt;The upper bound.&lt;/font&gt;&lt;font color="#808080" size="4"&gt;&amp;lt;/param&amp;gt;&lt;br /&gt;&lt;/font&gt;&lt;font color="#0000ff" size="4"&gt;Public&lt;/font&gt;&lt;font size="4"&gt; &lt;/font&gt;&lt;font color="#0000ff" size="4"&gt;Function&lt;/font&gt;&lt;font size="4"&gt; [Next](&lt;/font&gt;&lt;font color="#0000ff" size="4"&gt;ByVal&lt;/font&gt;&lt;font size="4"&gt; minValue &lt;/font&gt;&lt;font color="#0000ff" size="4"&gt;As&lt;/font&gt;&lt;font size="4"&gt; &lt;/font&gt;&lt;font color="#0000ff" size="4"&gt;Integer&lt;/font&gt;&lt;font size="4"&gt;, &lt;/font&gt;&lt;font color="#0000ff" size="4"&gt;ByVal&lt;/font&gt;&lt;font size="4"&gt; maxValue &lt;/font&gt;&lt;font color="#0000ff" size="4"&gt;As&lt;/font&gt;&lt;font size="4"&gt; &lt;/font&gt;&lt;font color="#0000ff" size="4"&gt;Integer&lt;/font&gt;&lt;font size="4"&gt;) &lt;/font&gt;&lt;font color="#0000ff" size="4"&gt;As&lt;/font&gt;&lt;font size="4"&gt; &lt;/font&gt;&lt;font color="#0000ff" size="4"&gt;Integer&lt;br /&gt;&lt;/font&gt;&lt;font color="#0000ff" size="4"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Return&lt;/font&gt;&lt;font size="4"&gt; &lt;/font&gt;&lt;font color="#0000ff" size="4"&gt;CInt&lt;/font&gt;&lt;font size="4"&gt;(Math.Floor((maxValue - minValue + 1) * NextDouble() + minValue))&lt;br /&gt;&lt;/font&gt;&lt;font color="#0000ff" size="4"&gt;End&lt;/font&gt;&lt;font size="4"&gt; &lt;/font&gt;&lt;font color="#0000ff" size="4"&gt;Function&lt;/p&gt;&lt;/font&gt;&lt;font size="4"&gt;&lt;/font&gt;&lt;font color="#008000" size="4"&gt;&amp;#39;&amp;#39;&amp;#39; &lt;/font&gt;&lt;font color="#808080" size="4"&gt;&amp;lt;summary&amp;gt;&lt;br /&gt;&lt;/font&gt;&lt;font color="#008000" size="4"&gt;&amp;#39;&amp;#39;&amp;#39; Generates a random floating point number between 0 and 1.&lt;br /&gt;&lt;/font&gt;&lt;font color="#008000" size="4"&gt;&amp;#39;&amp;#39;&amp;#39; &lt;/font&gt;&lt;font color="#808080" size="4"&gt;&amp;lt;/summary&amp;gt;&lt;br /&gt;&lt;/font&gt;&lt;font color="#0000ff" size="4"&gt;Public&lt;/font&gt;&lt;font size="4"&gt; &lt;/font&gt;&lt;font color="#0000ff" size="4"&gt;Function&lt;/font&gt;&lt;font size="4"&gt; NextDouble() &lt;/font&gt;&lt;font color="#0000ff" size="4"&gt;As&lt;/font&gt;&lt;font size="4"&gt; &lt;/font&gt;&lt;font color="#0000ff" size="4"&gt;Double&lt;br /&gt;&lt;/font&gt;&lt;font color="#0000ff" size="4"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Return&lt;/font&gt;&lt;font size="4"&gt; NextUInt32() * (1.0 / 4294967295.0)&lt;br /&gt;&lt;/font&gt;&lt;font color="#0000ff" size="4"&gt;End&lt;/font&gt;&lt;font size="4"&gt; &lt;/font&gt;&lt;font color="#0000ff" size="4"&gt;Function&lt;/font&gt;&lt;/font&gt;&lt;font color="#0000ff" size="4"&gt;&lt;/blockquote&gt;
&lt;p&gt;End&lt;/font&gt;&lt;font size="4"&gt; &lt;/font&gt;&lt;font color="#0000ff" size="4"&gt;Class&lt;/p&gt;&lt;/font&gt;&lt;img src="http://ilovevb.net/Web/aggbug.aspx?PostID=101" width="1" height="1"&gt;</description><enclosure url="http://ilovevb.net/Web/blogs/heroicadventure/attachment/101.ashx" length="4887" type="text/plain" /><category domain="http://ilovevb.net/Web/blogs/heroicadventure/archive/tags/heroic+adventure/default.aspx">heroic adventure</category><category domain="http://ilovevb.net/Web/blogs/heroicadventure/archive/tags/random/default.aspx">random</category><category domain="http://ilovevb.net/Web/blogs/heroicadventure/archive/tags/mersenne+twister/default.aspx">mersenne twister</category></item><item><title>site news</title><link>http://ilovevb.net/Web/blogs/sitenews/archive/2008/02/15/site-news.aspx</link><pubDate>Fri, 15 Feb 2008 20:02:00 GMT</pubDate><guid isPermaLink="false">f079997d-67b3-4d49-aaea-86507d683840:100</guid><dc:creator>admin</dc:creator><slash:comments>0</slash:comments><description>&lt;p&gt;Not much news lately, I&amp;#39;ve been really really sick and haven&amp;#39;t had much time (or strength) to do, well, anything.&amp;nbsp;&amp;nbsp; Fortunately we have some first class blogging machines busy on this site keeping the traffic flowing.&lt;/p&gt;&lt;p&gt;Now that I&amp;#39;m feeling better though, expect to see more of me.&amp;nbsp; (I&amp;#39;ve been playing ADOM again lately while recuperating, so expect to see an entry or two in the HA! blog.)&amp;nbsp;&lt;/p&gt;&lt;img src="http://ilovevb.net/Web/aggbug.aspx?PostID=100" width="1" height="1"&gt;</description><category domain="http://ilovevb.net/Web/blogs/sitenews/archive/tags/update/default.aspx">update</category><category domain="http://ilovevb.net/Web/blogs/sitenews/archive/tags/sick/default.aspx">sick</category><category domain="http://ilovevb.net/Web/blogs/sitenews/archive/tags/winter/default.aspx">winter</category></item></channel></rss>