Wednesday, November 23, 2005

set the wallpaper in C# using IActiveDesktop SetWallpaper

someone was wondering how to set the wall paper using the SetWallpaper function and didn't find any examples on the web, I decided to give it a try myself, armed with PInvoke and some Delphi sample code I found on the web, I came up with this solution.

You have to create a bunch of interfaces, enums, structs, etc that are defined in the IActiveDesktop interface and were originally in the shlobj.h, so I decided to create a new class to put all this stuff

you can download the class file here
after adding that to your project and adding
using Windows.Native; to the top of your class file, is as simple as:
private void button1_Click(object sender, System.EventArgs e) {
IActiveDesktop activeDesktop = shlobj.GetActiveDesktop();
activeDesktop.SetWallpaper(@"F:\somepic.jpg", 0);

Friday, November 18, 2005

Workaround for the MSDN subscription login problem
if you're behind a firewall and you're trying to access the MSDN subscription site, you might get a "The page cannot be displayed" error when trying to login, the page it redirects you to login is something like

to work around that, and be able to login, first navigate to this site:

and login there using your passport information, then on the address bar paste this address:

you are now logged in to your beloved MSDN subscriptions =o) (notice the sign out button), to get to the main page you would normally get if you logged in normally, just click on the left on the "Manage Subscription" link

Thursday, November 17, 2005

Command-line reference A-Z
for those of you die-hard command line fans... ok, more for me to remember

Wednesday, November 16, 2005

do not press the red button
really, do not press the red button

Monday, November 14, 2005

Pandora let's you discover music you didn't know you liked

if you like listening to music you have to check out, is quite a cool concept, is a small Flash Application that loads on your browser and lets you create radio stations based on your input, i.e. you enter an artist or a song that you like and from there Pandora gives you other songs that are similar in tones, rithm, etc from artists that you may even never have heard of but that you might like, you can create multiple radio stations of different styles of music, if you really like some song, you can even buy it from a link that is provided for each song, there's even music in spanish =o)

very nice marketing concept, you have to check it out

Thursday, November 03, 2005

MSN Messenger tabbed messaging (with Messenger plus)

if you use MSN Messenger and are not using Messenger Plus, you're missing a bunch, one of the features recently added is tabbed messaging, so you can have all your conversations in a single window just in different tabs, instead of having one conversation on each window

download the Messenger Plus from here:

and once you install it, in MSN Messenger main window go to the Plus! menu, Preferences, Instant Messages, Tabbed Chats, and check the "automatically group all my chats", or you can do it when you already have a conversation, on the Plus menu, Grouping options, group all chats (F9), the other nice thing, is when you are in tabbed mode, and you hit [ESCAPE] on your conversation, it closes that tab, and keeps all the other ones (just what I expected! =o) )

very nice work from the Messenger Plus team

if you are using Yahoo messenger, throw that away and try MSN Messenger with Messenger Plus!