Sydney moved to Mars

by Administrator25. September 2009 16:07

Woke up yesterday morning after it being really windy all night, to the deep orange glow of a very dusty Sydney. Very eerie it was, sorta like you'd think a dust storm on Mars would be :)

Took a couple of shots with my iPhone camera:

[caption id="" align="aligncenter" width="425" caption="Dusty Sydney"][/caption]

[caption id="" align="aligncenter" width="425" caption="Dusty Sydney in my apartment"]Dusty Sydney in my apartment[/caption]

It had mostly gone by lunch time and things were back to normal

Tags:

Some general Winforms coding info

by Administrator25. September 2009 02:01

The difference between Control.Invalidate, Control.Update and Control.Refresh:

Control.Invalidate()

Adds a region or a control to the update region of a window

Control.Update()

Sends WM_PAINT to the window if the windows update region is not empty (sends directly to wndproc bypassing the apps message queue)

Control.Refresh()

Calls invalidate and then update

String format alignment enums

The names of LineAlignment and Alignment (plus the descriptions in their tooltips) are confusing and I keep forgetting which one is which.

StringFormat.LineAlignment

Text alignment vertically

StringFormat.Alignment

Text alignment horizontally

Scrollbars

The scroll value automatically takes into account not scrolling the amount at the end of the range given by LargeChange. According to reflector:

case ScrollEventType.SmallDecrement:

newValue = Math.Max(this.value - this.SmallChange, this.minimum);

break;

case ScrollEventType.SmallIncrement:

newValue = Math.Min((int) (this.value + this.SmallChange),

(int) ((this.maximum - this.LargeChange) + 1));

break;

case ScrollEventType.LargeDecrement:

newValue = Math.Max(this.value - this.LargeChange,

this.minimum);

break;

case ScrollEventType.LargeIncrement:

newValue = Math.Min((int) (this.value + this.LargeChange),

(int) ((this.maximum - this.LargeChange) + 1));

break;

Tags:

A compact framework tip

by Administrator25. September 2009 01:56

Thought I'd start posting tips and reminders here for things about coding I have found useful, mainly as a place where I can store them so I can find them again when I have forgotten them in the near future :)

So this one is the location of the actual compact framework assemblies on your development machine, handy for loading into reflector.

C:\Program Files (x86)\Microsoft.NET\SDK\CompactFramework\v3.5\Debugger\BCL

Tags:

About the author

Something about the author

Month List

Page List