Home
Search
 
What's New
Index
Books
Links
Q & A
Newsletter
Banners
 
Feedback
Tip Jar
 
XML RSS Feed
 
 
 
MSDN Visual Basic Community
 
 
 
 
 
 
 
  Online Articles by Rod Stephens  
 
 

This page provides summaries and links to articles I have written that are available on the Web. DevX articles include source code in both Visual Basic 2005 and C#.

Note that publishers often post articles without telling me. If you find one that isn't listed here, please let me know.
 
DevX: Taming Trees: B-Trees
June 6, 2008
Learn how to build a B-tree similar to those used by databases to implement indexes.

This article explains how B-trees work. In addition to allowing you to build your own (which is an interesting but difficult exercise), it will give you a better understanding of how relational databases work.

DevX: Taming Trees: Parsing and Sorting
June 5, 2008
Learn how to use parse trees to evaluate mathematical expressions, and how to use sorted trees.

This article explains how to convert arithmetic expressions into parse trees that you can easily evaluate. It also explains sorted binary trees as a preview to the B-trees described in the third article in this series.

DevX: Taming Trees: Building Branching Structures
May 9, 2008
Learn tree nomenclature and how to build binary trees that can recursively traverse and draw their own nodes.

This article explains terms such as node, branch, degree, level, and other tree terms. It shows how to make simple tree classes and how to make a tree draw itself.

Later articles in this series will show how to make sorted trees and B+Trees simimlar to those used by databases to provide indexes.

DevX: Building Truly Useful Extension Methods
March 30, 2008
Use extension methods to breathe new life into old classes--even classes that you didn't write!

This article explains how to build extension methods and provides some useful examples that:

  • Mimic VB6's Left and Right string functions. (Where did they go in .NET?)
  • RemoveLeft and RemoveRight string extensions that do what you probably imagine.
  • Encrypt and decrypt strings.
  • Convert between byte arrays and strings of hrexadecimal digits.
  • DevX: Direct3D, Part 3: Using Meshes to Save and Load Complex Scenes
    March 5, 2008
    Direct3D's Mesh class lets you manage, save, and load complex scenes quickly and easily. This article explains how to build scenes in Visual Basic, save scenes into .x files, and load .x files built by your code or by other programs such as Studio Max, Blender 3D, and Lightwave 3D.
    Wrox Blox: Visual Basic Graphics Programming
    March 2008
    This downloadable PDF brief shows you how to add graphics to Visual Basic 2008 applications by explaining fundamental graphics techniques such as:

    • Drawing shapes with different colors and line styles
    • Filling areas with colors, gradients, and patterns
    • Drawing text that is properly aligned, sized, and clipped exactly where you want it
    • Manipulating images and saving results in bitmap, JPEG, and other types of files

    Also covered are instructions for how to greatly increase your graphics capabilities using transformations, which allow you to move, stretch, or rotate graphics. They also let you work in coordinate systems that make sense for your application. The author also describes techniques for using the above in printouts, describing the sequence of events that produce a printout and show how to generate and preview printouts, with examples which show how to wrap long chunks of text across multiple pages, if necessary.

    In addition, you will learn about two powerful new graphic tools that were introduced with .NET Framework 3.0: WPF graphics and FlowDocuments. XAML graphic commands allow a WPF application to draw and fill the same kinds of shapes that a program can draw by using graphics objects.

    Finally, a discussion on the FlowDocument object shows you how to define items that should be flowed across multiple pages as space permits. This lets you display text, graphics, controls, and other items that automatically flow across page breaks. FlowDocument viewers make displaying these documents easy for you, and simplifies the user's reading of the documents.

    This Wrox Blox also contains 35 example programs written in Visual Basic 2008, although most of the code works in previous versions of Visual Basic .NET as well. The most notable exceptions are WPF graphics and FlowDocuments, both of which require WPF provided in .NET Framework 3.0 and later.

    Table of Contents:

    • Using Graphics, Pens, and Brushes
    • Using Advanced Pens and Brushes
    • Drawing Text
    • Manipulating Images
    • Using Transformations
    • Printing
    • Using WPF Graphics
    • Building FlowDocuments

    ISBN: 978-0-470-34348-7
    66 pages
    US $6.99

    Wrox Blox: C# Graphics Programming
    March 2008
    This downloadable PDF brief teaches you how to add graphics to C# 2008 applications, explaining fundamental graphics techniques such as:

    • Drawing shapes with different colors and line styles
    • Filling areas with colors, gradients, and patterns
    • Drawing text that is properly aligned, sized, and clipped exactly where you want it
    • Manipulating images and saving results in bitmap, JPEG, and other types of files

    Also covered are instructions for how to greatly increase your graphics capabilities using transformations. Transformations allow you to move, stretch, or rotate graphics. They also let you work in coordinate systems that make sense for your application. You will also learn how to use all of these techniques in printouts. The author describes the sequence of events that produce a printout and shows how to generate and preview printouts.

    The final sections describe two powerful new graphic tools that were introduced with .NET Framework 3.0: WPF graphics and FlowDocuments. WPF applications can use XAML graphic commands to declaratively draw and fill the same kinds of shapes that a program can draw by using graphics objects.

    Finally, a discussion on the FlowDocument object shows you how to define items that should be flowed across multiple pages as space permits. This lets you display text, graphics, controls, and other items that automatically flow across page breaks. FlowDocument viewers make displaying these documents easy for you, and simplifies the user's reading of the documents.

    This Wrox Blox also contains 35 example programs written in C# 2008, although most of the code works in previous versions of C# as well. The most notable exceptions are WPF graphics and FlowDocuments, both of which require WPF provided in .NET Framework 3.0 and later.

    Table of Contents:

    • Using Graphics, Pens, and Brushes
    • Using Advanced Pens and Brushes
    • Drawing Text
    • Manipulating Images
    • Using Transformations
    • Printing
    • Using WPF Graphics
    • Building FlowDocuments

    ISBN: 978-0-470-34349-4
    69 pages
    US $6.99

    DevX: Use Specialty Arrays to Accelerate Your Code
    February 20, 2008
    Learn how to build unusually shaped triangular and sparse arrays, and arrays with non-zero lower bounds. The included classes let you manage even multi-dimensional arrays with non-zero lower bounds that are a lot faster than those provided by .NET.
    DevX: Drawing with Direct3D, Part 2: Lighting and Textures
    December 13, 2007
    Learn how to use Direct3D lighting models and textures to create more realistic three-dimensional scenes.

    This article explains how to add lighting models and textures to basic three-dimensional scenes. It explains how to use multiple light sources representing ambient light, directional light, spot lights, and point lights. It also explains how to use textures to make objects appear to be built of different materials such as wood or brick.

    DevX: Drawing with Direct3D, Part 1: Getting Started
    November 28, 2007
    Learn how to produce amazing, high-performance, three-dimensional pictures in Visual Basic or C# by using Direct3D.

    This article explains how to get started drawing three-dimensional graphics with Dircet3D. It tells how to download the SDK, initialize the Direct3D graphics engine, and draw. It explains how to use the Direct3D coordinate system and its drawing primatives to generate some non-trivial images.

    There will be at least a couple other articles in this series so get started with this one so you can follow the others and learn more sophisticated three-dimensional techniques such as lighting models, shading, and textures.

    DevX: Solving the 2D Packing Problem
    November 14, 2007
    In 2D packing the goal is to fit as many items as possible into a specified area, without overlapping. Discover some packing problem variants, and explore some approaches you can use to solve one variation. Then experiment with these on your own and let me know if you come up with a better heuristic.
    DevX: Gain Design-Time Power with Control Editors, Part 2 of 2
    November 5, 2007
    Learn how to support your controls with advanced visualization and property editors in the Properties window.

    This two-part article explains how to provide advanced support for the Windows Forms Designer and the Properties window with such tools as smart tags, custom property visualizers, custom property selectors, command verbs, and property pages.

    This part explains how to add custom editing dialogs, smart tags, and property pages to your controls.

    DevX: Gain Design-Time Power with Control Editors, Part 1 of 2
    August 17, 2007
    Learn how to support your controls with advanced visualization and property editors in the Properties window.

    This two-part article explains how to provide advanced support for the Windows Forms Designer and the Properties window with such tools as smart tags, custom property visualizers, custom property selectors, command verbs, and property pages.

    DevX: Making Delicate Decisions
    June 28, 2007
    Learn how to use decision trees to model just about any problem.

    This article shows how to model many difficult problems by using decision trees and shows how to search these trees for good solutions. It explains the "booty division problem" (aka "the partition problem"), the knapsack problem, tic-tac-toe (noughts and crosses), and others. It explains heuristics for finding good solutions to the "booty division problem."

    DevX: Use Transformations to Draw Your Own Great Graphs
    May 11, 2007
    Use .NET to build your own graphing control that displays bar, line, and point data either on its own surface, in a printout, or in an image file.

    This article shows how to build your own complicated graphs featuring line, bar, and dot style; maximum, minimum, and average lines; axes with tick marks and labels; and tooltips. You can even let the user drag data points on the graph vertically, horizontally, neither, or both.

    DevX: Terrific Transformations
    May 1, 2007
    Learn how to use .NET transformations to make rotating, stretching, and moving objects simple--even for complex objects such as paths and text.

    If you have not had much experience with graphics transformations, I highly recommend this article. After you've had some practice with them, transformations can make all sorts of graphics chores easier in Visual Basic .NET.

    DevX: Add Flexible Sort Capabilities to ListView Controls
    April 3, 2007
    Learn how to make the ListView control sort by a column when a user clicks on a column header, sort by all columns, or sort in just about any other way you can imagine. You can also use the techniques described here to provide custom sort orders in other objects such as List, ArrayList, and Hashtable. You can then easily display objects in multiple orders such as sorted by name, account number, balance, or date overdue.
    DevX: Splash Screens
    February 29, 2007
    This article is an excerpt from Chapter 19, "Splash Screens," in my book Expert One-on-One Visual Basic 2005 Design and Development. It lays out the process and considerations for one of the most common tasks that developers are called upon to do--and one that has caused untold amounts of trouble for them. Find out how to display non-rectangular splash screens, control splash screen duration, show application load progress, create About dialogs, and other often-requested, but not-so-well-known splash-screen features.
    Wrox: Executing SQL Statements at Runtime in VB 2005
    March 23, 2007
    This article is an excerpt from Chapter 9, "Scripting," in my book Expert One-on-One Visual Basic 2005 Design and Development. It explains how to allow a program to run SQL scripts at run time. I've used this technique in several projects to allow users to build their own reports. Often users can think of dozens or even hundreds of reports and allowing them to build their own saves developer time and gives the users more freedom.

    I've also used this technique to execute scripts myself. For example, you can write simple SQL scripts that automatically create entire databases, building tables and entering test data. This makes testing the application a lot easier.

    DevX: Four Heuristic Solutions to the Traveling Salesperson Problem
    January 30, 2007
    The Traveling Salesperson Problem doesn't have a realistic single best solution, but you can use heuristics to find good solutions and possibly enjoy big savings on fuel costs.
    DevX: Master .NET's Text Tricks
    January 1, 2007
    Learn how to use the Graphics object's methods to draw text in different fonts-clipped, wrapped, aligned, stretched, and rotated in all sorts of ways.
    DevX: Breathe New Life into Old Controls with ExtenderProviders
    December 1, 2006
    Learn how ExtenderProviders let you add new properties and behaviors to existing controls and components. This article shows how to make extenders to add extra information to existing controls, display status information and instructions, validate required fields, and check that fields are within required bounds.
    DevX: Colorful Algorithms: Solving Map-coloring and Related Problems
    October 27, 2006
    It has been proven that you can always color a map with four colors in such as way that no two adjacent regions have the same color. Unfortunately doing so can be both difficult and time consuming-but it's not too hard to color a map with five colors. This article shows how to quickly color a map with five colors. It includes a simple map editor that lets you try out the algorithm.
    DevX: Beautify Your UIs with Perfect Pen and Brush Control
    October 18, 2006
    Spice up your interfaces by taking full advantage of the Pen and Brush classes capabilities in the .NET Framework. Learn to create dashed and striped lines, control line joins, make custom end caps, and use brushes to create interesting patterns and colorful gradients.
    DevX: Decorate Your Code with Astonishing Attributes
    September 13, 2006
    Attributes provide extra information about your code that allows tools such as Visual Studio to make using your code easier. For example, they tell the Properties window how to display and edit properties and they let you fine-tune XML serialization. This article shows how to use attributes to make your code easier to use.

     

    Copyright © 1997-2008 Rocky Mountain Computer Consulting, Inc.   All rights reserved.
      Updated