Category Archives: opensource

Juggler v0.5.2: Wallpaper Changer for Windows Vista and XP (Update 6)

Update 6: Wallpaper downloads are not available from InterfaceLIFT anymore. Read details here.

Update 5: Updated InterfaceLIFT downloader to work with the changed code at interfacelift.com.

Even though the first basic version of Juggler pretty much did what it was supposed to do, there were few ‘nice to have’ things which were missing. So I updated it as soon as I got some free time. :)

Feature set:

Here is the list of features (existing+new) which are now included.

  • Its coded and unit tested to work on Vista and XP SP2 with .Net 3.5. It should work (not tested though) on Server 2008/2003 as they borrow UI code base from Vista/XP. No words for any other OS.
  • It runs in background and can be controlled from System Tray.

  • It can be configured to:
      • start with Windows.
      • look for wallpapers in multiple folders including/excluding sub-folders. Best results when used with matching resolution wallpapers.
      • change wallpaper once every preferred duration between 1 min and 500 hrs. It will understand “000 Hrs/Mins 000 Min” format. It can interpret M/Min/Mins/Minutes and H/Hr/Hrs/Hour as Minutes and Hours respectively.
      • confirm before changing wallpaper
      • adjust image positioning for odd size wallpapers.

  • You can also change wallpaper manually by clicking ‘Juggle Now’ menu or by double clicking the icon.
  • It allows only one instance at a time.
  • It also displays the last updated wallpaper and the time stamp when the next change will occur.
  • It displays a confirmation dialog before automatically changing wallpaper. Its configurable to show a confirmation dialog and for how long the message should be displayed.

  • “Active” option to enable/disable wallpaper juggling while program is running.
  • Last changed wallpaper is a clickable menu which opens the wallpaper in windows explorer.
  • You can download stunning wallpapers from interfaceLIFT.com and WallpaperStock.com using “Download Wallpapers” screen right within juggler.

Download:

This version uses .Net 3.5. Also, the downloads are posted at codeplex.com.

  1. Download and install .Net framework v3.5 if its not installed already.
  2. Navigate to Juggler release page at codeplex to download application and/or source code. The downloads are in Files section.

Implementation:

Most of the stuff is pretty straightforward. It uses Timer class to invoke code to change wallpaper. The invoked code then uses Win APIs to do the job. But there are few things which may interest you.

  1. There are all kind of anonymous method illustrations. You can also find basic as well as complex lambda expressions which, I think, are nothing but fancy anonymous methods invented for LINQ.
  2. It also demonstrates how to use System.Threading.Mutex to find and avoid if user is trying to run multiple instance of same application. This is the simplest and most accurate approach to create single instance application in C# (VB has some out of the box functionality). There is a catch in this approach which may disqualify this in certain cases.
  3. While implementing single instance functionality, I needed to warn user that the application is already running. Simplest way is to just display a message box. But I thought if the already running (first) instance can get a notification from second instance then it can show a balloon tip which will tell user where exactly the application is running. This may sound simple but its not.
    1. As both instance are separate processes, we are talking about inter process communication (IPC) here.
    2. There is no other way than remoting in .Net 1.0-2.0 for IPC. And opening a tcp(forget about http) port seems overkill to me in this situation.
    3. So I chose a self hosted simple wcf service with named pipe binding. May be I’ll post about using named pipes in WCF for IPC later some time.

As always, please use it at your own risk. Feel free to rant in comments. :)

Enjoy!


.NET Framework Source Code will be released with Orcas!

This is huge. Actually, not huge but still. :) Scott Guthrie today posted that Microsoft will be opening up the source code of some parts of .Net framework. And the plan is to keep doing it for rest of the libraries.

Its not like we can’t browse through the .Net framework source code now but the really nice thing about this move is that you can step through the actual .Net code while debugging your source code.

image

So, you are on a breakpoint on .Net method call in your code and if you hit F11, you will land right inside the .Net framework code. I can’t remember how many times I went back to Reflector to find what exactly was going on. This is going to help everyone, big time. Even Microsoft will gain something in this. I bet they will cut a lot on support calls. :)

Now, don’t confuse this with Open-Source as lots of people are. This is NOT Open-Source. The source is released under Microsoft Reference License. As the name suggests, this is just for your reference to help you understand .Net better (if you opt to) and allow to step through .Net source while debugging.

Amazing decision. Development will be fun now. I mean, more fun. :P

Enjoy!


Notepad++

First thing first. Notepad sucks. It adds zero value to (read decreases) your productivity. There is only one reason to use it… its light.

I tried couple of options available but Notepad++ wins for sure. This is open source project, straight forward and easy to use. This can do whatever a normal editor is supposed to do. Adding to that, it supports syntax highlighting and syntax folding for C, C++, Java, C#, XML, HTML, PHP, JavaScript, makefile, ASCII art, doxygen, ASP, VB/VBScript, Unix Shell Script, BAT, SQL, Objective-C, CSS, Pascal, Perl, Python, Lua, Tcl, Assembler, Ruby, Lisp, Scheme, Smalltalk, PostScript, VHDL, FORTRAN, Ada, Caml, AutoIt, KiXtart, Matlab and Verilog. Couple of these I didn’t even heard of :( .

It has rich set of features. Such as:

  • Syntax Highlighting and Syntax Folding
  • WYSIWYG
  • User Defined Syntax Highlighting
  • Auto-completion
  • Multi-Document
  • Multi-View
  • Regular Expression Search/Replace supported
  • Full Drag ‘N’ Drop supported
  • Dynamic position of Views
  • File Status Auto-detection
  • Zoom in and zoom out
  • Multi-Language environment supported
  • Bookmark
  • Brace and Indent guideline Highlighting
  • Macro recording and playback

For me, the best use is when I say “View Source” from IE. To open source in notepad++, change your default program to open text files in notepad++ using Folder Options.

I know there are are more advanced editors than this. I haven’t tried them all but most of them are kind of real resource hog or complex. If you haven’t use it, give it a try. :)

All that said doesn’t mean I am saying notepad++ is advanced editorthan Vim or Emacs. But I really can’t think of a text editor for which I have to read tutorials. Really, tutorials for using a text editor. Am I missing something?

PS: There is a basic comparison of text editors at Wikipedia. If you can spare time, try as much as editors from the list. :)


Follow

Get every new post delivered to your Inbox.