Playlist Tutorial - [5/15/04] - These are examples of
playlists in C# with the Windows Media Player Component. When I needed this info I couldn't
find it, so I figured I'd post a small example of how to create dynamic playlists in C#. I
also created my own playlist class that was much easier to use than the standard one.
MS Access Manager - [10/30/06] - This is a very small executable that allows you to
view an access database file(.mdb). You can see all the objects in the file and run queries or commands
on the database. It also shows the columns for each table which can be really nice. I really hate the query
structure in access, so this allows you to simply query against the database or use standard statements
to create, alter, insert, etc. on the database. The panes are also resizeable so you can adjust the windows
as needed. In order to view the tree you have to allow read access to the file. This is done in Tools ->
Security -> User and Group Permissions. Then click on MSysObjects and check "Read Data".
*Update" - I added the ability to connect to oracle as well as access.
The Access alone version: Access Manager
The Oracle/Access version: Oracle/Access Manager
The DLL based seperate windows version: DLL Access Manager
Movie Database 1.1 - [3/15/2005] - This is a simple C#/Access program database I wrote for
my Father to keep track of his DVDs that he loans to people. It could definitely use a few
user-friendly upgrades, but it is very straight-forward and works well. The zip file contains
the executable, the access database, the main source file, and some basic instructions.
MovieDB.zip
Keyboard Mouse Control - [11/4/2005] - This program allows you to control your mouse with
your keyboard. Alt+Ctrl+(Arrow Key) moves the mouse in increments of about 10% of your screen size
in order to move the mouse fast. To make small movements you just add the "Win" key while holding down
the others. You can also left click using Ctrl+Alt+Enter and Right Click using Ctrl+Alt+"0"(from numlock).
I used the Global Hook class found here:
http://www.thecodeproject.com/csharp/globalhook.asp?print=true.
This was an excellent tutorial. You can download the project here:
globalhook_src.zip. Using his class I modified it to react to the keystrokes of my choice.
I had to use some Win32 stuff for the mouseclicks, but it was neat to do and learn. The zip file contains
the program, the mainform.cs, and some instructions.
KeyMouse.zip
Word to Html Converter - [1/2/2006] - This is a very simple program that I wrote to convert ".doc" word files to
html files. You can do this in word by choosing a save as option, but when you have to convert a few
hundred word files that isn't practical. You can use it like a normal program and it will prompt you for
the file location(absolute path), or you can feed it file names when you call it like:
Word2Html File1 File2 File3 etc...
I have thought about expanding it to save as the other formats word does, or including excel and just making
a several format converter, but for now I'll leave it as is and show you the code, so you can modify it to
suit your needs.
WordToHtml.zip - Contains the executable, Word DLL files, and CS
file.
Here's the basic gist of how it's done. Include the MS Word COM reference in your project. Then this is
the function:
public bool DocToHtml(string docPath, string htmlPath) { try { Word.Application app = new Application(); app.Visible = false; Object o= System.Reflection.Missing.Value; object docFile = docPath; _Document doc = app.Documents.Open(ref docFile,ref o,ref o,ref o,ref o,ref o,ref o,ref o,ref o,ref o,ref o,ref o); // Office 2000 //_Document doc=app.Documents.Open(ref docFile,ref o,ref o,ref o,ref o,ref o,ref o,ref o,ref o,ref o,ref o,ref o,ref o,ref o,ref o,ref o); // Office 2003 object fileName = htmlPath; object format = 8; // Html doc.SaveAs(ref fileName,ref format,ref o,ref o,ref o,ref o,ref o,ref o,ref o,ref o,ref o); // Office 2000 //doc.SaveAs(ref fileName,ref format,ref o,ref o,ref o,ref o,ref o,ref o,ref o,ref o,ref o,ref o,ref o,ref o,ref o,ref o); // Office 2003 object t = true; app.Quit(ref t,ref o,ref o); return true; } catch(Exception e) { return false; } } |