Coding 4 Fun

Coding 4 Fun – Never miss a message again

My most recent Coding 4 Fun article has just gone live.  I wrote a screensaver where people can leave you messages.  If you leave your office/cubicle at work and people stop by, they can leave you a message without resorting to little paper notes that get lost! Link: http://blogs.msdn.com/coding4fun/archive/2010/02/28/9970627.aspx

Coding 4 Fun Article – Windows 7 Jump Lists

My latest Coding 4 Fun article has been published.  I have a simple application that demonstrates how to create a jump list in your Windows 7 application.  It shows how to create a setup utility that registers a file extension, and shows how to pass arguments to a running instance of your application (necessary to invoke actions on yourself from jump list commands).  Enjoy! Link: http://blogs.msdn.com/coding4fun/archive/2009/12/09/9933039.aspx

Coding 4 Fun – Windows 7 Taskbar

My latest MSDN Coding 4 Fun article, Windows 7 Taskbar, has been published.  I’m a bit behind the times actually, since it’s already been out a week or two!  In case you haven’t seen it though, it’s an introduction to using the Windows API Code Pack to take advantage of new Taskbar goodness in Windows 7.  Hopefully some good info there with Windows 7 release coming up soon! Link: http://blogs.msdn.com/coding4fun/archive/2009/08/25/9874533.aspx

Coding 4 Fun - Startup Optimizer

After a long delay, I've published another Coding 4 Fun article.  This one is a good start toward optimizing Windows startup.  It scans your Startup folder and will start the items at boot-time instead of Windows.  The advantage is that it can insert a delay between each application, or even wait for an idle CPU before launching one.  It uses user controls, a background worker, threading, and a number of other cool features.  This will be my last XP/VS2005 article.  Everyone should be on Visual Studio 2008 now!  As for Vista, well I'll try to make things work in both...

Coding 4 Fun - MultiWall (Wallpaper Tool for Multiple Monitors)

Well, I got another Coding 4 Fun article filed a few days ago.  This one makes it easy to apply separate wallpaper images to each of multiple monitors.  Just drag-and-drop an image file to a special "drop region" on each monitor.  Learn about wallpaper, image resizing, drag-and-drop, and general Windows Forms programming. Enjoy! En mi artículo mas nuevo (¡en ingles, lo siento!), escribí sobre fondos de escritorio para pantalla múltiple.  Puede aprender sobre imágenes, arrastrar y soltar, y aplicaciones Windows Forms.  ¡Disfrutarlo! Article link

Coding 4 Fun: Going Paperless

My most recent Coding 4 Fun article was published a week or so ago.  I'm too behind to get things up any sooner over here!  I created an app to scan documents using WIA, then it can auto-crop (if conditions are perfect!), and update file metadata for the images.  It's a good starting point for scanning and working with metadata.  If you're interested, click here.

New Coding4Fun : Where am I? What am I doing?

After too long of  a hiatus, I finally published a new article to the MSDN Coding 4 Fun section.  I love my GPS receivers (I have an Ambicom Bluetooth unit and a Garmin serial/USB), and I decided that it was about time to learn how to interface with them.  As an application, I decided to write a plugin for Windows Live Writer (my blog poster of choice!).  Now I can click a button to insert my current coordinates and an embedded Virtual Earth map at my location.  Not much point at home, but next time I'm traveling somewhere, it could be...

Coding4Fun : Photo Screensaver

 My latest Coding 4 Fun article went live today.  It uses GDI+ to create a screensaver showing your photos with a Polaroid-style frame.  It was more work than I thought it would be, but I'm pretty pleased with the result.  You can locate images based on a folder (with or without subfolders), or using keywords from Desktop Search.  It works well and looks pretty cool! Link to Coding4Fun : Photo Screensaver

Coding 4 Fun - "Check out" this code (Part 2)

My newest Coding 4 Fun article is online now.  It's a continuation of the code to interface with libraries running Horizon Information Portal.  It's a nice UI to monitor your books (and fines) from the system tray, also supporting search.  Links to the source code can be found in the article, but I thought that I'd include a binary link as well.  Note that the source code links are hosted on Channel9, while the binary link is below.  Enjoy! Article link Binary (executable) link

Coding 4 Fun - Check out this Code

My latest article is live on Coding4Fun.  I wrote an API to interact with public libraries running Horizon Information Portal by SirsiDynix.  It takes advantage of the XML that they expose to search for books, retrieve patron name/address (given user ID and password), checked out books, holds, and blocks.  The library is packaged in a DLL along with a simple test client.  This is part one with a second part to build a more functional UI with the same DLL.  Check it out! Link to Check out this Code

Coding 4 Fun: Enhanced File Open/Search Dialog

My newest article (part 1 of 2) has been posted on MSDN Coding 4 Fun.  It uses Windows Desktop Search (again) to demonstrate some interesting ways to leverage the index.  I wanted to create a replacement for the standard file open dialog using search instead of folder navigation.  You refine your search by file type, then up to three attribute/value pairs.  At this point there are still a few issues with performance, and it's not quite useful enough yet, but it's getting close.  It's pretty good at replacing the iTunes browser for the moment, and you can search for other...

Coding 4 Fun - Searching the Desktop

My most recent Coding 4 Fun article has been up for a few weeks now, but I haven't gotten around to mentioning it yet!    I wrote a neat little utility that uses the Windows Desktop Search index to provide auto-complete functionality for file names.  As you start to type, it shows files across your local hard drives (and possibly network).  The standard filesystem-based autocomplete (built-in to the TextBox) works based on matching the full paths, from left-to-right.  This one is based on solely on filename, so will find files that even contain the string in the middle of the word.  It's fairly...

Coding 4 Fun: Naughty or Nice?

I've got another article posted on MSDN Coding 4 Fun.  Naughty or Nice scans your blog/web site to see how good or bad you've been based on words you use in your posts.  It uses regular expressions to search for terms in your web page.  It also looks at linked pages to rate them, though it weighs them less for the overall score.  It's a fun way to play with the WebClient, BackgroundWorker, and Regex classes. Link: Naughty or Nice

Coding 4 Fun: Enter Sandman

After a long hiatus, the MSDN Coding 4 Fun site is back online again!  Check out it's cool new UI.  It's taken me some time, but I finally got a new article posted.  The article discusses a nifty little utility that I wrote to put your computer to sleep or shut it down based on some action.  I wrote it so I could go to bed at night, knowing that the computer would standby at the end of a long operation (file download, video transcoding, large file copy, etc).  You specify a window to watch, then you can specify an...

Wallpaper Cycler

Every so often, someone asks about a precompiled version of an application from my article series.  I should have done this in sync with the columns, but oh well.  I'm going to try to get each one published via ClickOnce now.  Here's the link to my Wallpaper Cycler.  It's a relatively simple application to scan a folder, and optionally its subfolders, in order to select an image to show on the desktop.  You can specify a command-line argument of "-autoclose" in order to have it change the background and exit.  This might be useful on system startup.  I should probably...

Data-Enable Your Applications

My newest article has been published on MSDN Coding 4 Fun.  Many hobbyist developers may not know much about databases or how to work with the free SQL Server Express engine that it included with Visual Studio Express.  In this article I discuss how to create a database, create a DataSet to access it, then how to integrate that DataSet with your application.  Pretty neat stuff! Check out the article at: http://msdn.microsoft.com/coding4fun/inthebox/dataenabled/default.aspx  UPDATE (6/26/2007): It has come to my attention that this article is no longer hosted since the Coding 4 Fun was redone.  I've zip'd up the code and article and...

Trick Out Your Applications - Questions

I received some questions from Gary M. about my Tricking out your applications article.  I figured it might be helpful to someone else so I'm posting it here for everyone's benefit.  I expect there will be questions sometimes, but if I'm ever just way off on my level, I hope that someone will let me know! Heres the code section in question: public TrickForm(){    InitializeComponent();    backgroundComboBox.Items.Add(        new TaggedString("RoundedAAA", Properties.Resources.RoundedFrame));    backgroundComboBox.Items.Add(        new TaggedString("Star", Properties.Resources.StarFrame));    backgroundComboBox.Items.Add(        new TaggedString("Gear", Properties.Resources.GearFrame));}private void backgroundComboBox_SelectedIndexChanged(object sender, EventArgs e){    TaggedString val = (TaggedString)backgroundComboBox.SelectedItem;    Bitmap bmp = (Bitmap)val.Tag;    SetFormBackgroundImage(bmp);}   What is TaggedString?  I can't find a definition for it anywhere. This is something...

CORRECTION: Working with Application Settings

My recent article with the wallpaper cycler made use of application settings to retain the location of the pictures folder, whether to recurse into subfolders, and other options. You can run the application and immediately change the wallpaper using the system tray notification icon. As it turns out, I had a bug in my implementation. I used the Properties pane to associate my user interface fields with application settings. In my code then, I assume that all data transfer is two ways throughout. While this is true in the general case, it turns out that...

Mutexes and garbage collection

Michael H. sent me a comment yesterday stating that my "Tricking Out Your Applications" code had a bad flaw. Recall that I show the use of a System.Threading.Mutex object in the Main method in order to prevent more than one instance of the application from running. Michael noticed that, while this works in Debug mode, it does not work in Release mode. Weird, I thought. I tried it myself, it worked fine, and I let him know there must be something else at fault (like any American, my first instinct is self-preservation -- it's not my...

Coding for Fun: Wallpaper Cycler

My latest article is online.  I expanded on an earlier article that set the desktop wallpaper, and now it demonstrates how to work with settings, scan a file folder,  work with the random number generator, and do simple imaging functions (determine size, change image format).  It's a pretty nice start, and can be extended pretty easily to be even better.  Check it out at: http://msdn.microsoft.com/coding4fun/inthebox/wallpaper2/default.aspx UPDATED: Newer post here

Tricking out your applications

My newest article has been posted on MSDN.  It's about making your Windows forms look better using techniques not directly available through the Visual Studio properties and wizards.  Ever wondered how to make your application start without the main form appearing?  How about making an application single-instance?  Adding a system tray notification icon?  What about those funky-shaped forms (like in music player apps)? All of this is covered in the new article.  Check it out at: http://msdn.microsoft.com/coding4fun/inthebox/trickedoutapp/default.aspx

Another Coding 4 Fun holiday article

For this installment, I wrote an application to keep track of the countdown to a given day.  It shows days, hours, minutes, seconds until the event on a borderless, transparent form overlaid anywhere on the screen.  It demonstrates borderless transparency (cool stuff!), constrained movement, arbitrary dragging region on a form, topmost, and variable opacity.  Check it out at: http://msdn.microsoft.com/coding4fun/holiday/countdown/default.aspx

In time for Christmas... (my latest Coding 4 Fun article)

MSDN Coding for Fun is doing a holiday feature with a geek gift-buying guide, and a number of Christmas-themed articles.  There's a cool wish list app, a screen saver, and from me, a task manager for keeping track of New Years' Resolutions and other things to do.  It's pretty straight-forward, but takes advantage of a few nice tricks like the CheckedListBox control, showing your own form as a modal dialog, using notification alerts, and it uses a Mutex to prevent more than one instance from running at once. Check out my article at: http://msdn.microsoft.com/coding4fun/holiday/taskman/default.aspx

Wrong download link on Coding 4 Fun article

On my latest article, “Keeping Track of Time,” the code download link for VB is incorrect.  Both links were erroneously pointing at the C# version.  To download the VB version, just substitute VB for CS.  In the meantime, here are the links for convenience: C#: http://download.microsoft.com/download/d/4/5/d4556729-81f9-4578-936a-111721b27e49/TrackingTime-CS.msi VB: http://download.microsoft.com/download/d/4/5/d4556729-81f9-4578-936a-111721b27e49/TrackingTime-VB.msi Sorry about that!  Thanks Tony D'Ambra for being the first one to point this out!  Hopefully it will be corrected soon. -Arian

New Coding for Fun article - Keeping Track of Time

I noticed that my most recent article was posted two days ago.  I wrote a system tray utility for keeping track of time spent on projects.  With all of the work I do on various concurrent projects, I felt that this would make a lot of sense.  It's a bit simplistic to start with, but already lets you add a list of projects, track hours, and view a breakdown of your time.  I am adding some enhancements to it myself, and will be posting an updated version (C# only) directly on my web site soon.  Most are ease-of-use enhancements that...

Another Coding 4 Fun article

In all of the hubbub over the release of Visual Studio 2005, I neglected to announce the release of another Coding 4 Fun article on MSDN.  This one interacts with Windows Media Player 10.  It extends a sample application from the Media Player SDK to allow you to skip and/or mute sections of media clips as they play.  The time codes get saved as XML files alongside the original files so they are non-destructive.  The name is “Non-Destructive Media Edits.“  Not really edits, I suppose, but the same effect.  Nice to screen/censor material for family viewing. I'd really like to extend it...

Newest article posted

My newest article has been posted on MSDN Coding 4 Fun!  I wrote a little utility to watch a specified folder for new files.  When files appear, you can have them automatically moved to a different folder based on extension.  This would let you setup an incoming folder, perhaps for an HTTP file uploader, then have all images moved to one folder, all Microsoft Word documents moved to another folder, etc.  It's a neat little thing that runs in the system tray.  I think it offers some good opportunities to add onto it (it's admittedly pretty basic now...), but it...

Coding 4 Fun article is live!

Well today I noticed that my MSDN Coding 4 Fun article went live!  It's a short article on how to create an alarm clock in the system tray.  It's a neat way of showcasing some of the easy-to-use features in Visual Studio 2005.  I should have another article showing up at least once a month and plan to write lots of neat little utilities (hopefully providing actual usefulness!).  I'd be glad to take a suggestion if anyone has one, or at least take an idea into account.  Otherwise I'll come up with ideas that make sense to me.  In general,...