Ive just been trying to figure out a way to hook into the windows message loop of a WinForm.
protected override void WndProc(ref Message m)
{
Trace.WriteLine(m.Msg.ToString() + “: “ + m.ToString());
base.WndProc(ref m);
}
In an attempt to fix a form that hangs when you lock the computer. Haven't fixed the form yet but the message loop helps.
Update: In the end it was controls being created on a background thread which lead to the hang.
Friday, 4 December 2009
Hooking into the windows message loop
Sunday, 8 November 2009
Predictably Irrational
Haven't posted for ages. I have been reading a book "Predictably Irrational" by Dan Ariely about behavioral economics. Fascinating stuff in it, like how first impressions count on our later choices. A good read so far, I recommend it if you have the time.
Sunday, 16 August 2009
Improvments to Paint .Net 3.5 startup speed
It starts up much faster now, well done to Rick Brewster and anyone else who worked on this version.
If they could speed it up even faster it would be just fantastic.
Friday, 14 August 2009
Anybody else noticed
how stack overflows ratings system is busted?
I've kind of lost interest in it now. My stack does not overfloweth anymore.
Saturday, 27 June 2009
“Huburb”
I was just having a shower and thinking of how Melbourne is growing and I think I came up with a new word. Huburb to describe a major hub suburb. The ones where all the trains and trams meet and there are cinemas and shopping centres.
I was thinking of Camberwell and Box Hill when it came to me. The “huburbs” that have failed to materialize from Steve Brack’s Melbourne 2030.
So that’s my new word. I’ll think I’ll send the word to Justin Madden the current planning minister for Victoria.
Tuesday, 26 May 2009
Silverlight Rule 1
Discovered a Silverlight issue today in Visual Studio 2008.
When you add a user defined control to a control the parsing can stuff up. If the 1st control has event handlers that are not defined or parse incorrectly then you get into a state that is hard to recover from. I ended up with many AG_E_UNKNOWN_ERROR and AG_E_BAD_TYPE errors.
This leads to Silverlight rule no 1.
"Don't put event handlers into your Xaml."
Until the parser gets better, either VS2010, Silverlight 3 or a patch this seems to be the way.
Saturday, 23 May 2009
USB Flash memory
Been having horrible trouble with a 16GB USB Flash stick today. Couldn’t copy a 9GB file to it. Never found an answer. In the end I destroyed it by using convert.exe /FS:NTFS. rats
Edit:
I fixed my flash disk. In the end I booted from a windows XP DVD into a recovery mode. Then I used the FixMBR command. Oh boy.


