Monday, July 5, 2010

How to change Win 7 logon screen

Windows 7 OS enables OEMs to set their own Log-on screen. So if you want to customize yours, you can make use of this registry setting.

  • First you need to enable the custom wallpaper flag in registry. To do so, navigate to HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Authentication\LogonUI\Background

image 

  • Now set the DWORD value OEMackground to 1, by default it will be 0.
  • Now you have enabled the custom background feature, to select the defaultbackground navigate to c:\Windows\System32\oobe\
  • Create a new folder here called info then one more inside called backgrounds
  • Copy a JPG file to this folder now and  call it backgroundDefault.JPG. Final structure should look something like this…
  • image 

Win + L, now you see it!!!

Friday, June 25, 2010

Why live writer is better than MS Word for blogs

Well this is the first article, as well as the test article for using Windows Live Writer for blogger. At first glance I found following advantages

  • Its WYSIWYG – Yeah, it uses your blog theme, CSS, font… everything
  • You have a preview and option to edit the source code
  • Finally a neat HTML, doesn’t crap like Word does
  • Support for publish scheduling
  • Easy way to publish photos – still testing… Smile ( tested, working fine)

image

  • Loads faster and doesn’t have many unwanted options.
  • easy to load previous entries and edit
  • Easy to label articles

Anyway I strongly recommend downloading and using Windows Live Essentials

Monday, June 21, 2010

Hosting Silverlight Application on Facebook

Objective is to create a game using Silverlight which will utilize Facebook platform and publish on facebook application directory. Following are the features which we will target to deliver
  1. You can compare your score with friends
  2. You can invite your friends on Facebook
  3. You can post your score and events like beating a friend on to your wall
  4. List top 100 scores
  5. List your friends top score along with their profile pictures
In simple words, we are going to walk through the creation of ittiGator Game on Facebook. Take a break now, have a good look at it and come back. Here you go… http://apps.facebook.com/ittigator
Creating game using Silverlight
I will not go into details, its left to your creativity and coding to create a working model. Make sure you make it modular, and lets make a module called ScoreCard and place a control called ScoreCardControl. Here we will list out 6 users including the player , ordered by scores. What you would need from Facebook will be friends list, and friend’s photo. Scores we will be maintained in our SQL Server DBs

To be continued...

Saturday, June 12, 2010

Displaying FBJS dialog on top of Plug-in content

You cannot display any HTML Content on top of a plugin content. This is because of different window message loops running for browser and the plugin content. If you are working with Silverlight there is an option to specify to Silverlight to use browser windows message loops for paint messages. Set windowless=true to make use of this.

However this is not recommended as it will drastically slowdown your Silverlight application. Well, there is no point in using a slow Silverlight application.

If you have realized the limitations by now, lets work on the workaround. I have an application called ittiGator( a facebook game http://apps.facebook.com/ittigator ) where we are prompting with a publish dialog on completing the game.


What we will do is, we will create two DIVs sitting one top of other. We will host our Silverlight in one and publish button in other.
DIV – Publish button with some background.
DIV – Silverlight Content

Do you want to share your High Score with your friends?
We will call a JavaScript method called publish from Silverlight using
HtmlPage.Window.Invoke("publishScore", new string[] { UserScore.Text, UserName.Text });
In this publishscore method we will increase the height of ShowCase div to amount that is enough to push the plugin content just below the visible screen area.

function publishscore (score, usrname) 
{
document.getElementById("Showcase").style.height = '800px';
}
Reset the height on the publish dialog call back function
FB.Connect.streamPublish('', g_attachment, g_action_links, null, 'Post your high score and let the world follow you!', stream_callback_resizetheDiv);

This should work if you work with flash based application or even if you have an activex control embedded.

Leave a comment if you need any assistance in implementing this.

Thursday, June 10, 2010

Publishing your Product/Corporate website

If you are a startup and don’t want to spend much time in getting your website out, here we have a solution.

http://www.drupalgardens.com/ can get your website ready in 15 mins!!! To be practical, you can have your full blown website ready in a day. If you say that you have other providers who can do this, believe me they can’t. I strongly recommend you to run through the video and think again. I tried their beta and I am a fan of Drupal garden now!




What it is?

It’s a Drupal based hosting, with a great pluggin added for customization. With this admin plug-in you can

1) Chose templates
2) Chose themes
3) Chose color schemes( this is too good)
4) See workflows
5) Provide your custom CSS etc



Even though they are prized lil high, I think its worth if you are a start-up and focus on your product than the overheads.

Tuesday, May 18, 2010

Dealing with browser repaints

Recently i wanted to hide a silverlight plugin content and display some html content in its place. As you might be knowing, plug-in content redrawing is a known problem all the time. So i decided to put both the contents in a table row and dynamically set the row height.



document.getElementById("Showcase").style.height = '0px';
               and
document.getElementById("Showcase").style.height = '500px';

Problem later i found that it works fine with IE, FF, Chrome but in opera its a problem. It requires you to scroll once for redrawing the content.  So you will still see the flash/Silverlight content and the new html content, untill you scroll.

This has been discussed in couple of places, but could not find any solution. So, i decided to put a scroll automatically. I tried scrolling it with 1 px, it worked!!! So i tried with 0px.... and ... it worked too!!!!

window.scroll(0, 0);
Try and let me know if it fixes your repain problem too...

Wednesday, March 24, 2010

Listing all the websites installed

Following Managed C++ code enumerates all the Websites. Useful if you are writing some kind of installer.

This requires IIS6 Metabase pack installed on IIS 7.X. Refer my other article for IIS 7 based installers.

For now...

System::String* entryName = System::String::Format(S"IIS://{0}/w3svc", computerName);
System::Text::StringBuilder* sb = new System::Text::StringBuilder(512);
System::DirectoryServices::DirectoryEntry* rootEntry = NULL;
System::DirectoryServices::DirectoryEntry* childEntry = NULL;
try
{
rootEntry = new System::DirectoryServices::DirectoryEntry(entryName);
rootEntry->RefreshCache();
System::Collections::IEnumerator* iterator = rootEntry->Children->GetEnumerator();
while(iterator->MoveNext())
{
childEntry = dynamic_cast(iterator->Current);
if(!childEntry->Name->Equals( S"AppPools", System::StringComparison::CurrentCultureIgnoreCase ))
{
if(!childEntry->Name->Equals(S"Filters", System::StringComparison::CurrentCultureIgnoreCase))
{
if(!childEntry->Name->Equals(S"Info", System::StringComparison::CurrentCultureIgnoreCase))
{
//Print childEntry->Name;
}
}
}
}
}