Visual Basic Blog

A group blog from members of the VB team

Latest posts

Mar 22, 2007
Post comments count 0
Post likes count 0

Coding a Euchre Game, Part 7: Total Logic (Matt Gertz)

Anthony D. Green [MSFT]

Coding a Euchre Game, Part 7:  Total LogicSince I’ve been concentrating on specific VB functionality, you may have noticed that the one topic I haven’t really drilled into yet is game logic, and yet it’s central to what a game is all about.  Games have certainly gotten more sophisticated over the years, and yet that sophistication is largely a result of graphical and audio advances.  The actual logic of games itself hasn’t changed nearly as much  – I still have to exercise pretty much the same control over my NWN2 party as I did way back in Pools of Darkness, for ...

Mar 20, 2007
Post comments count 0
Post likes count 0

Coding a Euchre Game, Part 6: Pump up the volume (Matt Gertz)

Anthony D. Green [MSFT]

Coding a Euchre Game, Part 6:  Pump up the volume Ever since Commodore first introduced the SID chip to their line of PCs way back in the earlier 80’s, sound has been an important experience in any computer game.  What’s particularly exciting to me is that audio has caught up to graphics as far as game relevance goes – I can’t imagine Planescape: Torment having the same sort of immersive experience without Mark Morgan’s haunting, searching themes, or Icewind Dale messaging the loneliness and weariness of travelling across the ice plains without Jeremy Soules’ amazing harmonies. Alas, I can’t pretend tha...

Mar 19, 2007
Post comments count 0
Post likes count 0

Coding a Euchre Game, Part 5: Modality is a crutch (Matt Gertz)

Anthony D. Green [MSFT]

Coding a Euchre Game, Part 5: Modality is a crutch It’s really tempting to rely on modal dialogs in a program.  It forces the user to pay attention to what you feel is the most important thing.  However, modal dialogs can also be frustrating to users and you should be careful about when you use them.  To illustrate this point, let’s consider the Euchre game again.  At some point, the user is going to be asked to play a card.  Ideally, you don’t want the user to do anything else because there isn’t anything else the user can do – right?  Well, no exactly.  Remember that the user ...

Mar 16, 2007
Post comments count 0
Post likes count 0

Coding a Euchre Game, Part 4: Tooltips and Menus (Matt Gertz)

Anthony D. Green [MSFT]

Coding a Euchre Game, Part 4: Tooltips and Menus Menus and tooltips are so incredibly important to applications, and yet implementing them sometimes seems to be arcane magic.  In this post, I’m going to do my best to demystify them. Menus To add a menu, you simply drag a MenuStrip control from the toolbox to your form.  As with the Timer control from the last post, the control will end up in the grey area at the bottom of the form; however, there will also be a visible component at the top of the form.  Use the former to change the name of the control, but mostly you’ll be working with the visual i...

Mar 14, 2007
Post comments count 0
Post likes count 0

Coding a Euchre Game, Part 3: Timers (Matt Gertz)

Anthony D. Green [MSFT]

Coding a Euchre Game, Part 3: TimersIn my previous posts regarding the Euchre game creation, I discussed some issues with creating a complex form and maintaining images to be shown on it.  In this posting, I’m going to start covering some of the more esoteric controls.Timers and Message PumpsTry this:  go to your Programs menu in Windows and launch the “Hearts” game.  Play a few hands of it.  Go ahead, I’ll wait.(hum-dee-dum-dee-dum)You back yet? Notice anything a little odd about that game?  The action is just a little fast, isn’t it?  In fact it’...

Mar 13, 2007
Post comments count 0
Post likes count 0

Coding a Euchre Game, Part 2: Show me the cards! (Matt Gertz)

Anthony D. Green [MSFT]

Coding a Euchre Game, Part 2: Show me the cards! In my previous post, I discussed using control-drag to speed up the design of a form which uses lots of similar controls.  In this post, I’m going to discuss displaying images on those controls. Now, the face of each card is going to need an image, and you’ll also need one image for the back of the card (which you can use for any of the cards).  This is where I’m afraid you’re going to have to leverage your own artistic talents, unless you can find some "free" cards.  For VBEuchre, I used Paint.exe to design each card by hand, because I couldn’t find...

Mar 13, 2007
Post comments count 0
Post likes count 0

TableAdapter and Multiple Result Sets

VBTeam

Several people asked me whether TableAdapter can be used to retrieve multiple result sets from stored procedures. The quick answer is... No, you can't do that with TableAdapter.Fill() method that gets generated as a part of Typed Dataset. But there's a very simple work-around. DataAdapter.Fill() & Multiple Result Sets TableAdapter.Fill() method calls DataAdapter.Fill() to retrieve data from database. And DataSet.Fill() method allows you to retrieve multiple result sets from a stored procedure. In order to retrieve multiple result sets, an overload of DataAdapter.Fill() that takes Dataset as a parameter needs ...

Mar 13, 2007
Post comments count 0
Post likes count 0

New Data Tools Features in Visual Studio Orcas

VBTeam

Here's a list of new data tools features in Visual Studio. I will be discussing each one in more detail in upcoming posts. Object Relational Designer The object relational mapping technology lets you map relational databases to objects. Once the mapping is done, you can manipulate mapped objects as normal objects and easily submit changes back to relational database without writing complex data access logic. It is the latest enhancement in data access technology and there are many different implementations out there currently. However, no O/R implementation comes with a graphical designer that makes it easy to ...

Mar 12, 2007
Post comments count 0
Post likes count 0

Fun with card tricks (Matt Gertz)

Anthony D. Green [MSFT]

Back when I first started writing code, I got interested in game writing, and was fairly sure I could write out text-based games as well as the other offerings one could find on mainframes and, later, on the Commodores/TRS/Apples of the day.   The flow of those games were really very easy – you’d present a block of text to the user to read to set up the situation, and then simply prompt the user for a pseudo-English sentence which you’d parse for keywords (“GO NORTH,” “PICK UP  SWORD,” “SHOOT BOB,” etc) – you’d then proceed to the next block of text, and so on.  Easy to write, easy to amaze yo...