Wednesday, February 25, 2009

Menu Selection Gets Stuck on Screen

At work,

when I chose an item in a right click menu it stuck on screen,
It dissappeared when I locked and then unlocked the pc,
but reappeared the next time I selected an item. This does not work in windows 7 (and maybe 8), the quick workaround there is Start > Run :
tskill dwm

Right clicking the desktop and closing the menu also helped, but this were only workarounds.

I finally solved it :
Go into Windows Performance Options and de-select the option for "Fade out menu items after clicking."

In Vista, you can find it by right clicking My Computer > Properties > Advanced system settings (link on the left) > Advanced (tab) > Performance settings (button) > Visual effects (tab).

To cure it one in windows 7 you can set the corresponding monitor from 32 bit to 16 bit and back again, to remove one item. If it keeps happening, use the above solution.

Friday, February 20, 2009

Windows Needs to Format this device when you plug in usb stick

I recently bought myself a Sandisk Cruzer stick for on the road.
Everything worked fine untill windows (vista) began to complain when I plugged in the stick : Windows needs to format this device (or something very similar)

Having some data on the stick I didn't want to format it, so I started looking around. I found the solution :

With the usb stick plugged in (it does not really matter but it makes it easier)
go to Start / Control Panel
Here depending on whether you have the classic view or not :
Classic view : System / Device manager (left side)
Standard view : Hardware and Sound / Device manager / View hardware and devices

Here find the usb stick driver in the device manager (should be under Disk Drives),
be sure to select the correct one!
Right click it and choose uninstall

After this unplug and replug the usb stick, vista will now install 'new' drivers and that did the trick for me.

I also read somebody who had to redo this when he restarted vista, but in my case this was not needed.

Tuesday, January 13, 2009

Run as different user in Vista and Server 2008

When you shift + right click in Vista (or Server 2008) you will not find the trusted Run As ... Item, all you find is Run as Administrator. But this is not always what you need.
You can use the command prompt and the Runas command but this is not so easy as the old right click command.

Enter Sysinternals, they release a little tool called ShellRunAs that you can find here

After you downloaded it copy the ShellRunas executable to the windows\system32 folder and run shellrunas /reg

From this moment the run as different user item is back in your rightclick menu (or in your shift right click menu)

Thanks Sysinternals!

Thursday, December 18, 2008

Linq Where not exists query

Today I needed a where not exists query in my linq to objects.

Fortunatly I found it using the google :)

Suppose we have 2 lists, the first of a dummy class with properties Id and Name, the second of another dummy class with properties Id and Color (just so they are different)

We can perform a 'where not exists' query as follows :

var OnlyInFirstQuery = (from item1 in list1 select item1.Id)
.Except
(from item2 in list2 join list1Item in list1 on list2.Id equals list1Item.Id select item2.Id);


This will give us a list having only the items in list1 that do not exist in list2, just as I needed.

Thursday, October 9, 2008

Using Internet Explorer 6 on vista

There is probable a few people who would want to run ie6 on vista,
probably the webtesters (like me), or people who don't like ie7 (like me) but do not want to use opera or firefox (unlike me). And since the normal XP portable editions do not work, it seemed there was no answer.

Searching the google did not reveal much,
only that a lot of people were trying the same thing.

Luckily I found a great program IETester which makes this possible
(I did not test yet if it does everything IE6 does, but for my case, it was perfect).

the link is : IETester homepage

This program allows you to run your (or other) sites in
internet explorer version 5.5, 6, 7 and since the latest version 8 beta 2.

I hope this helps somebody!

Wednesday, October 8, 2008

Window opened from javascript

When using javascript to open a window, it appears on top.
When this window loses focus (gets in the background),
and the user clicks the link again, the window is reloaded,
but does not get the focus again.

Since for some people this is important, the solution is to make sure the opened window has the focus :

var openedWindow = window.open("someurl", "somewindowname");
openedWindow.focus();


This will refocus the opened window.

Thursday, August 28, 2008

Internet Explorer 8 Beta 2

Internet explorer 8 Logo
Microsoft has opened up the second beta for Internet Explorer 8

Some new features are :
- Accelerators : Select some text and a new Icon pops up, allowing you to search it with Google, mail it, ...
- Search bar improvements : Sizable, and it can show the first result for seaches on eg. wikipedia
- Web Slices
- Stability : Crash recovery and each tab has its own thread, so crashes should close only one tab.
- Tab groups : When opening a link from a tab, both tabs will get a color, indicating at a glance which tabs belong together.
- Inprivate Browsing (a.k.a. the porno modus) : When activated IE will not remember any cookies, or leave traces from the sites you have visited.
- And more (click here for the tour)

I installed it on vista, and it seemed a little faster (maybe my perception). Tabs groups seems very nice and useful. The first look is very nice, better than IE7, but I guess it will not yet replace my Opera :)

You can download the beta :
Here for XP
Here for Server 2003
Here for 64 bit XP/Server 2003
Here for 32 bit Vista/Server 2008
Here for 64 bit Vista/Server 2008

Enjoy :)