Wednesday, 23 February 2011

Fallout New Vegas

I've rented New Vegas this weekend gone and have been playing it a lot since. It is so similar to Fallout 3 which incidentally I have not finished all the side quests yet.

I don't know what it is with this game, because the shooting is not great, especially if you're not using VATS, graphics are poor-ish, dialog animations are so last century and I just can't stop playing it. Must be the story, it's just so good and there so much to explore it's incredible.

Friday, 18 February 2011

Create a custom New Item form for SharePoint Custom Lists

You do not have to use the built in New Item form that you get when you want to add new item to a SharePoint list. You can create a specially formatted form for instance with fields grouped and various layouts. To achieve this you need to have SharePoint designer installed (free from Microsoft) and the how from below.

I had to do this four times now in the past couple of years or so and every time need to remind my self the steps. So here it is:
  1. Create your custom list with all the columns you need.
  2. Using SharePoint Designer open the site containing the custom list you want to create a new "New Item" form.
  3. Browse to the custom list web part under Lists folder.

Thursday, 17 February 2011

Manipulating applications window from .NET application

One of my colleagues was "hacking" a third party application by placing his own .NET application partly over it, at the specific coordinates. To do this he needed to be able to find third party application and set its window position and size on the fly from his .NET app. So I coded a DLL for him.

First I needed to find the window:
public static bool FindApplicationByWindowName(string AppName)
{
int bRtn = 0;

foreach (Process p in Process.GetProcesses("."))
{
try
{
if (p.MainWindowTitle.ToString().ToLower() == AppName.ToLower())
{
bRtn = p.MainWindowHandle.ToInt32();
}
}
catch { }
}
return bRtn;
}

Wednesday, 16 February 2011

Exporting Active Directory security group members to text file

One of the bosses asked me for a list of users in a security group just now. Thinking too high of the M$ management console I thought I can just copy and paste all members but I was wrong. So had to learn a new command on the good old command prompt:
dsget group "group distinguished name (DN) i.e. CN=Sales\\ Latin America,OU=Distribution Lists,DC=microsoft,DC=com..." -members >> filename.txt
and ta-da, all members popped up in the text file called filename.txt!

Monday, 14 February 2011

Portal 2 on Valentine's Day

It is really encouraging to see Valve has invested into making this Portal 2 trailer for Valentine's Day. It could mean that they are dedicated and hard working, or just desperate to get some publicity, or maybe both.
I really enjoyed Portal. It is a clever little puzzle game built around a very simple idea. Get from A to B using a portal that you can place in almost any surface. Portal 2 will have co-op mode hence the which is what the trailer is aiming to bring forward: