| |
|
|
|
|
| |
I plan on using this page as a mixture of projects I'm working on, code examples, helpful resources, and maybe my .02 every now and again. I'm not going to limit the languages or applicable environment; what I've been playing around with is what I'll use...or something like that. For VS.NET projects I'll probably provide source code files, any toolbox controls I create, and maybe a compiled example or two. Any straight code examples I'll stick in an i-frame; feel free to copy whatever you like.
12-9-2003 Since I've spent some time with this site, I'm going to concentrate on ASP.NET first. As I build more fully functional windows applications, I'll add on downloads and source code examples.
|
|
| |
|
|
| |
ASP.NET
|
|
|
|
|
| |
Closer and closer we get to not having local software.
StreamReader/Writer C# & VB
|
|
| |
Sometimes when you need to store information that doesn't need to be structured meticulously for specific data retrieval, I find the good ole text reader/writer to be helpful. The tagboard you might have noticed on the mainpage is a perfect example. On page load or post back, the streamreader opens a reads a text file to the end. When the user submits text from the fields, the reader first opens the text file and reads it to the end storing the information into a variable. Then the writer creates a text file of the same name (thus overwriting the file) and adds the text from the field control. After the submitted text is written, the writer appends the information from the variable. I did not simply append the posted text to the text file because I wanted the latest submission to be on top. Another way of accomplishing this would have been just to have the streamreader read backwards through the text file, though to make things easier when I need to edit or remove an entry directly, I decided to create this loop. Don't forget to include the System.IO namespace.
|
|
| |
| |
StreamWriter/Reader.CS
| |
| |
|
|
| |
|
|
| |
StreamWriter/Reader.VB
| |
| |
|
|
|
|
| |
|
|
| |
BlackJack VB
|
|
| |
This took on many faces before I finally moved on; as a result you will notice an abundance of variables and routines mapping more than needed for the output. I ended up with a simple BlackJack game with a few minor twists. The same basic rules of 21 apply: closest hand to 21 without going over, face cards are valued at 10, aces can be either 1 or 11, etc. The dealer, however, has casino styled rules only on hard hands: she will hit until the sum of her hand is 17 or greater on any cards other than ace. If the dealer draws an ace, she can use either value and compare cards with the user. The source code is available under the 'downlad my projects' to the left, just right-click and Save Target.
|
|
| |
!! Run Application !!
| |
| |
|
|
| |
.NET Frame
|
|
|
|
|
| |
The deeper you search, the better.
System Drawing VB
|
|
| |
Without a doubt, one of the coolest object filled namespaces in the .net framework is System.Drawing; the possibilities for remotely creating and manipulating graphics using these classes are endless. I created the following example to display a few of the objects found in Drawing sub-classes and how you could use them. As you can see, the code (in VB.NET) is pretty straight forward: a new bitmap is created following by a new texture brush that draws the text on the image.
|
|
| |
!! Run Application !!
| |
| |
|
|
| |
|
|
|
|