May
30
2007

:D Hilarious reading :D

Roy Osherove just posted a link to a really hilarous story about a fantastic hacker, a must read.

Shut Up I Hack you

I read this one a while but yesterday a friend forwarded the link to me again, and I smiled as I read it again.

Here's how to be a real hacker

May
25
2007

RegisterClientScriptInclude and scripts ordering

I spend a part of this evening fighting with ScriptManager.RegisterClientScriptInclude and had no chance to use it in a way that my javascripts would appear after MicrosoftAjax.js and in an order that I defined.

I finally found a solution, using ScriptManagerProxy and declaratively listing the javascripts in the order I wanted.

May
23
2007

Cannot open new window under Vista !!

I was experiencing for some time a quite strange effect on my no so old installation of Windows Vista. After some dyas of usage without any reboot I sometime was unable to open any new window, it could be an explorer, internet explorer 7 tab, a menu of tray icon, and this without any error message. I first thought it was an issue with the video driver, but after too much annoyance I searched the web and found a post "Max Num. of Open Windows under XP/2003/VISTA - Resolved !' explaining the issue and a possible fix.

From Ohad's WebLog

When I'm working (it happens from now and then...) I always tend to open lots and lots of explorer windows as I Google for answers to questions that come along while coding...

When I used XP and Win 2003 it always bothered me that as soon as I opened 15-17 Internet explorer windows my system got stuck so hard that even right click context menu wouldn't seem to show up.
When I migrated to Vista I though that finally someone in MS will fix this limitation but I was disappointed to find out that it still there...

Well after looking and looking... searching and hacking ... I found the answer !

Its all about the desktop heap !

Following is Desktop Heap Tweak:

Because it is an undocumented registry tweak I take no responsibility regarding implementing this tweak ! It worked for me and if you choose to tweak your system you are doing it on your own risk.

Longtime Windows users are familiar with the desktop heap, a memory space that Windows allocates for desktop objects such as, well, windows.

Each open window or other desktop object uses up a certain amount of the desktop heap. In older versions of Windows the desktop heap was very small, and objects weren't always disposed from the heap correctly.

This was a good part of the reason for the Incredible Shrinking Resource Heap problem that plagued the 16 and hybrid 16/32-bit versions of Windows.

NT fixed this problem by devoting a far larger chunk of memory to the desktop heap -- but the fact that it had a far better memory manager than Win 3.x or Win9x, and a pure 32-bit architecture, didn't hurt either.

The desktop heap limit affects the NT/VISTA family of systems, Hitting the limit is manifested as either a DLL initialization error for USER32.dll or an out of memory error.

Fortunately, the limit it tweakable, the default settings are low enough that the limit is easily hit.
To tweak the limit, take a look in the registry at HLKM/System/CurrentControlSet/Control/Session Manager/SubSystems

(cranked up a bit if you find yourself manipulating a lot of desktop objects.)

Within that key is a subkey called Windows, which contains in it, among other things, the value "SharedSection=1024,3072"

Changing the SharedSection entry to "1024,3072,512" (note the comma and the value)increases the size of the "hidden" desktop heap.

If that doesn't work, try increasing the second of the comma delimited values (e.g. 3072 -> 4096) which is the size limit of any particular desktop heap.

Update: just to clarify for some pepole... on vista your default is 1024,3072,512 changing is to 1024,4096,512 will make the difference

I did the modification and for the moment didn't had any issue, but I will wait one more week to be sure that it works good for me.

May
23
2007

Start++ 0.5 and 0.6 released

Start++ is an enhancement for the Start Menu in Windows Vista. It also extends the Run box and the command-line with customizable commands.  For example, typing "w Windows Vista" will take you to the Windows Vista page on Wikipedia!

See the full description on this page.

What is new from 0.4.6 to 0.6

Fixes since 0.4.6

  • Double-quotes in web searches should work properly now.
  • UI hook should be more reliable
  • Fixed some erroneous idle CPU usage when running in the background.
  • Misc stability improvements.

New Features

  • Search Startlets can now be scripted using JavaScript! 
  • Fancy new scripting UI.

Changes since 0.5

  • The included "play" scripts were broken for most people, they are now fixed.
  • Start++ no longer attempts to hook the Start Menu UI on non-English versions of Windows (support for other language versions will come eventually).
  • Fixed focus issues when launching commands or elevated apps (hopefully once and for all).
  • Running a Startlet from the Start Menu no longer starts a new shortlived Start++ process to execute it in, if Start++ is running in the background.
  • The embedded Start Menu UI shouldn't jump around anymore the first time it's shown.
  • The "mail" and "play" scripts now show friendly error messages if no results are found.
  • Script authors can now get at the parameters the user typed in as well as the full search query
  • Added "Donation / License" tab.
  • Other misc fixes.

It is a great tool even if the version 0.4.6 was buggy and crashed often on my machine.

May
5
2007

CSS Adapters issues with Login controls

If you are using ASP.NET 2.0 CSS Friendly Control Adapters 1.0 with the Login controls of ASP.NET 2.0 you might have experienced some issue like multiple postback when using Internet Explorer. You might get a GREAT fix and explanation of the issue from Tana Isaac of Wellington, New Zealand.

Double Postback Problem - Cause (skip this if you just want the fix!):

Buttons that reside within the controls that are adapted by the CSS Control Adapters, for example the CreateUserWizard.CreateUserButton, are rendered out differently depending on the button type (which is set for example via CreateUserWizard.CreateUserButtonType = ButtonType.Link). The default button type used by the membership controls is Button. The following html controls are rendered out for the different System.Web.UI.WebControls.ButtonType enum values:

ButtonType.Button: input, type=submit
ButtonType.Image: input, type=image
ButtonType.Link: anchor

Both of the input controls will automatically cause the form that they reside within to be posted back to the server when they are clicked, whereas the anchor will not - instead it needs some javascript to cause a postback. This is where the problem is - all three html controls are rendered out with javascript attached to post the form back to the server on a click event, which allows buttons of type 'Link' to work correctly but causes buttons of type 'Button' and 'Image' to postback twice - the first time due to the javascript and the second because of the native postback.

The javascript method used to cause the postback is as follows:

WebForm_DoPostBackWithOptions(WebForm_PostBackOptions(eventTarget, eventArgument, validation, validationGroup, actionUrl, trackFocus, clientSubmit))

In order to stop 'Button' buttons and 'Image' buttons firing twice we just need to set the clientSubmit parameter to false when these types of buttons are rendered out.

Other problems (specific to the CreateUserWizardAdapter control)

Once the double postback problem was fixed two other problems popped up. The first was that users still weren't being created. This was because the id and name (which is derived from the id) being used for the create user button was missing an underscore.

The other problem was that the cancel button didn't work. It was also missing an underscore from its name and also wasn't registered for Event Validation.

Read more...

Great work Tana, Thanks for sharing you saved me some time.

Update: The CSS Adapters project is now hosted on Codeplex, http://www.codeplex.com/cssfriendly.

May
5
2007

Switcher 1.2 - Nice Vista Aero tool

A nice tool for Windows Vista, I will not tell you more you need to try it (especially you Didier ;-)

You can get it from this page: http://insentient.net/

The blog about Switcher is on this page: http://baostuff.spaces.live.com/

About Laurent

Laurent Kempé

Laurent Kempé is the editor, founder, and primary contributor of Tech Head Brothers, a French portal about Microsoft .NET technologies.

He is currently employed by Innoveo Solutions since 10/2007 as a Senior Solution Architect and certified Scrum Master.

Founder, owner and Managing Partner of Jobping, which provides a unique and efficient platform for connecting Microsoft skilled job seekers with employers using Microsoft technologies.

Laurent was awarded Most Valuable Professional (MVP) by Microsoft from April 2002 to April 2012.

JetBrains Academy Member
Certified ScrumMaster
My status

Twitter

Flickr

www.flickr.com
This is a Flickr badge showing public photos and videos from Laurent Kempé. Make your own badge here.

Month List

Page List