Background From 1960 - 2009
My first exposure to programming was during the 1960’s when I learned some of the basics in Cobol and Fortran but I never used any of this as computers then were vacuum tube and punch card devices. In the 1980’s I became involved with computers due to my interest in photography. The Amiga was the first computer that could do primitive photography and I became involved with that community of users.
While attending a convention of Amiga users I met one of the prime developers of the Amiga, Jay Minor. During a discussion with him about my dislikes in software he suggested that I should learn to program. He said it’s easier to program than to be constantly learning other peoples programs. This advice turned out to be prophetic and to this day I try to largely use my own programs. The primary advantage of this is that if I don’t like how it works I can change it.
The dedicated languages for the Amiga were “Assembly” and “C” so I began learning “C” which is a lot easier than “Assembly”. In 1990 the hand writing was on the wall and the demise of the Amiga was immenent. I had a friend who was in the Home Inspection business and he wanted a program to do inspections with on a laptop so I purchased a copy of Borlandc and embarked on my first adventure writing code for the MS platform.
The MS platform at that time had only limited ability to do graphics and since I had come out of the Amiga community I had some experience with relatively advanced graphics programs. I had written the basic interface for a mushroom identifier on the Amiga and my friend Dick who is a botanist wanted to create a identifier for ferns on the MS platform. We wanted to use images but MS at that time did not have tools sufficient to create the graphics so we used the Amiga to develop the graphics and wrote a program in “C” to do the search, logic, and used a display device called VPIC by Bob Montgomery to display the graphics.
We started on this project in 1992 and did not complete it until 1998. During this time technology changed vastly. MS Win became SVGA compatible and the MS platform for the first time could do real photography. We started using a graphics library written in assembly by Dan Sill called SVGACC.lib. This library had a large volume of example source code written by Steven Baulkum. Steve’s source code is piece of real art. Clear, concise, well commented, and very instructive I learned “C” programming from this more that anywhere else.
Using the SVGACC.lib to do display of .PCX 256 color images allowed me to write programs with graphic displays and I wrote a paint program, an animation display program and integrated this display into the fern program.
At the same time I had become interested in doing sound on the computer. The Sound Blaster was the primary sound device in the beginning and Creative offered free source code to developers. After a short time I was able to do picture displays with SVGACC.lib accompanied by sound “WAV” files from my own source code.
During the late 1990’s after the introduction of Windows XP my Borlandc compiler became outdated and I migrated to Linux operating system. This was primarily motivated by the high cost of the MS compiler as Linux offered a free GNU compiler which used the “C plus, C plus plus ” programming languages. During that period open source code in the Linux environment provided the opportunity to develop picture display devices and a MP3 player. MP3 was a newly emerging technology which I felt was going to revolutionize the way we listen to music. I started encoding my Jazz collection to MP3 and this has become an ongoing activity, which continues to this day.
Programming C#
In the fall of 2004 the NYS Museum made a request of me to update the NE Fern Program for the new versions of Windows and my son who is also a programmer convinced me that I should set up a machine with Windows XP and the Studio .NET compiler. I had resisted this because of the costs involved in both hardware and software but I finally gave in buying a new machine, XP, and a compiler. I wrote a few command line programs with the compiler but soon discovered that to derive maximum benefit from this new system it would be necessary to adopt the C# programming language.
C# is a language dedicated to the Windows operating system and it greatly simplifies writing programs to do multi-media. The
first project was a rewrite of the "Fern Identification Program".
Now in the past five years I have written over 100 programs in C# many
of which are for display and processing of images, video, and sound. That effort continues to date.
I have now written many pieces of software in C# including the following:
NE Fern Identifier
George’s Perennial Guide – over 100 perennials with culture notes and photos
MIplayer.exe – mp3 player with list and export facilities and associated picture display.
MHcdcopy – Copy CD’s to WAV
MHcompress - Compress WAV or Flack file to MP3
MHrecord – Analog audio recording to many formats including WAV and MP3
BUS2k06 – The newest version of Business Utilities System
FLAGCALC.exe – A calculator for packaging Flag Stone, Palette #, sq.ft.,$
AE.exe – a simple ASCII editor
MHclock – a C#alarm clock
MHconvert.exe- Batch convert BMP TIF JPG GIF PNG wit resize for internet photos
Log Media.exe – A log for CD’s, MOVIES and MUSIC with CD cover creation
Log URL.exe - Stores lists of URL addresses and automatically connects using selected browser
MHplay.exe – A small media player FLAC, WAV, MP3, AVI, MPG, multitasks well
MHprint.exe – Print ASCII and picture files - great for CD covers
MFslide.exe – A slide show utility
MHview.exe – Picture viewer for use from .BAT files or programs numerous
modes of operation from parent programs
search.exe – A search engine for ASCII files.
My C# Tutorial
My C# Tutorial has been a popular download for some time now. It has been downloaded over 6000 times from numerous sites where it has been posted including my own. The most common complaint I got from the old version is that it was written under Vis 2008 and the files were not backward compatible to Vis 2005. I found little advantage to Vis 2008 and many times the programs were rendered unusable for people that have not updated their .NET framework beyond 2.0. Since any one using Vis 2008 can easily convert the Vis 2005 files I have written these programs under Vis 2005 to achieve a broader range of compatibility.
On my demo disk there are many examples of more complex programs written with C# but there is a folder "\DEMO\C# V8 Tutor" which is a tutorial for beginning programmers. I wrote the original tutorial for a group of aspiring 12-15 year old programmers. Each one of the tutorials illustrate a single concept. More complex programs are made up of many such methods combined.
Within that folder there are three folders:
C#
compiler – Here I have placed an .ISO image of the Vis 2005 Integrated
Development Environment ( IDE also known as “Compiler”). This file can
be burned to a disk with a program such as Nero to create an
installation disk for the IDE.
Tutor Progs – This folder is where the executable program for each one of the examples is deposited upon compiling. You can go in this folder
and click on any program to see them work before examining the source code.
Tutorials Source Code Vis2005 – Contains the source code for all the tutorial examples.
For those of you that have my “DEMO” disk I suggest you copy the folder “DEMO” to the root of any drive without changing the name as the source code has dependencies and destinations set to “DEMO\<folders>”. You will find the .ISO to create an installation disk for the installation of the compiler in \Demo\C# V8 Tutor\C# compiler. Demo disk available from me for $10 s/h.
For those of you that have downloaded the file “C# Tutorial Demo.Zip” . I suggest you unzip the file to the root of any drive and then change the name to “DEMO”. The ZIP file does not contain ISO image of Vis 2005 which you will have to download from MS (540megs). It is free! Make sure you get the C# version .ISO
http://www.microsoft.com/express/2005/download/offline.aspx
Okay you installed Vis 2005 and you have the “DEMO” on your hard drive. I suggest you go to the folder “\DEMO\C# V8 Tutor\Tutor Progs” where all the executables are deposited. Try out the various programs so you can see what they do.
To compile source code open the folder “\DEMO\C# V8 Tutor\Tutorial Source Code Vis2005”
Open the source code for the program you want to peruse and you will find a file with the extension “.sln” which is known as a solution file. Clicking on this file will open the source code in the “IDE” along with all the associated source files. You will then be able to go to the menu bar “View/Solution Explorer” which will open a list on the right side of the screen. In each one of the tutorials the main form is called “Form1” in the “Solution Explorer”. Double click on “Form1” and the “Form1.cs[Design}” will open. This is where the various tools are assembled to create a program. If you right click on any blank area in the form a option will be available to show the “source code”. You can also see the source code for each of the tools by left double clicking on any of the tools on the form. To compile and run a program press and hold the Ctrl key and press F5. This will compile the program and run the executable file.
Tutorials in package
Tutor01 - Hello World
Tutor02 - Simple Directory Utility
Tutor03 - Simple Picture Display
Tutor04 - Word Search
Tutor05 - Write and Read To File
Tutor06 - Recursive Directory Search for File Type
Tutor07 - Spawn A Child Process
Tutor08 - Display Picture Full Screen
Tutor09 - Display a random Number
Tutor10 - Screen Capture
Tutor11 - Show Drive Info
Tutor12 - Yes No Query
Tutor13 - MP3 WAV Player
Tutor14 - Play Video
Tutor15 - Iterate the characters in a string
Tutor16 - Print pages
Tutor17 - Print Rectangle
Tutor18 - Sort A String Array
Tutor19 - Pass integer between forms
Tutor20 - Draw Pie Chart
Tutor21 - Make CD Cover
Tutor22 - Make proof sheet of Images
Tutor23 - Resize Image and Print
Tutor24 - Mouse Panel
Tutor25 - Speech
Tutor26 - Elapsed Time
Tutor27 - Text Box To file
Tutor28 - Slide show
Tutor29 - Advertising Timer
Tutor30 - Alarm Clock
Tutor35 - Advanced Directory
Good Luck – Enjoy
For Download - http://sites.google.com/site/electricfarm/d/TutorialsSourceCodeVis2005.zip?attredirects=0