The Artima Developer Community
Sponsored Link

.NET Buzz Forum
Write Console Apps with .NET

0 replies on 1 page.

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 0 replies on 1 page
Tim Sneath

Posts: 395
Nickname: timsneath
Registered: Aug, 2003

Tim Sneath is a .NET developer for Microsoft in the UK.
Write Console Apps with .NET Posted: Dec 16, 2003 1:00 AM
Reply to this message Reply

This post originated from an RSS feed registered with .NET Buzz by Tim Sneath.
Original Post: Write Console Apps with .NET
Feed Title: Tim Sneath's Blog
Feed URL: /msdnerror.htm?aspxerrorpath=/tims/Rss.aspx
Feed Description: Random mumblings on Microsoft, .NET, and other topics.
Latest .NET Buzz Posts
Latest .NET Buzz Posts by Tim Sneath
Latest Posts From Tim Sneath's Blog

Advertisement

I've been really amused by how excited people are by the enhanced console support in Whidbey. At our developer conference, there was a smattering of applause when Kieran demonstrated a text-mode version of Space Invaders written entirely in managed code (and that's saying something - whilst US audiences are generous with their applause during sessions, we're a cynical lot over this side of the pond :-)

Space Invaders image 

Whidbey introduces to the Console class the ability to change colour, reset the cursor position, clear the screen, and even play sounds (any sound you like, so long as it's "beep"). I find it rather ironic that it's taken nine versions of Visual Basic to get to this high level of advancement (although there was of course the aberration that was Visual Basic for DOS).

If you want this functionality right now, I created a little sample for GotDotNet that uses .NET interop to call the underlying Windows API to achieve similar effects. The library is called ConsoleEx, and it supports .NET Framework 1.0 and 1.1. It's a good example of how to call into C APIs as well as hopefully being useful in its own right. Since I've written it, it probably doesn't scale well and is without doubt a poorer class design than the Whidbey one - the usual disclaimers about lack of warranty apply here more than ever.

(Incidentally, if you're a registered Whidbey beta site, you can download the Space Invaders sample from BetaPlace.)

Read: Write Console Apps with .NET

Topic: Windows XP 2.0 Previous Topic   Next Topic Topic: Seven Microsoft VPs getting millions in options deal

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use