Finally, I have used a Model View Controller!

Today I actually managed to use a Model View Controller in an application. I have been looking for an opportunity to use one fore a while, and have been reading a lot about them (Jeremy Miller’s Build Your Own CAB Series has been a very good guide). The type of MVC I like most (so far) is the Passive View type, where the View does almost nothing, and has no link to the Model:...

May 18, 2009 · 2 min

SQL Like statement

Today I learnt a few new (well to me) SQL commands. The Like statement can do some basic regex type things. It supports character specifiers like this: Column Like '%[a-z]Test[a-z]%' This will find the word test as long as there is a letter at either end of the word in a block of text. You can also say Not a letter like so: Column Like '%[^a-z]Test[^a-z]%' This should find any words Test that do not have letters before or after them....

May 15, 2009 · 1 min

Conflicting Unrelated Options: Alps Trackpad vs Microsoft Mouse

Usability. It’s one of those things that everyone wants, you know, stuff that ‘just works’. It’s nice when companies go out of their way to make things ‘just work’. It’s a shame Sony (and others, but I have a Sony, so it’s their fault for this exercise) decided to make things harder for me. Allow me to explain. I have a Sony Vaio (VGN-FE21M), which has an Alps touch pad, which like all touch pad has tapping enabled by default, and that I switch off straight away....

April 17, 2008 · 2 min

Creating Non resizable controls

A control I was recently developing required being non-resizable when on the form. When the application is running, this would be easy enough, just set its AutoSize property to False, and don’t dock the control. However, this leaves the problem of resizing in the designer. You could override the resize event of the control, but for reasons outlined earlier, such as flickering, I decided against this. Somewhere on the internet (where else…?...

April 13, 2008 · 2 min

Vaio Event Service and Vista

When I first installed vista onto my laptop (a Sony Vaio VGN-FE21M) I also installed all the Sony stuff that I needed for it, mainly the VES (Vaio Event Service) and Control Panel, although there is a lot of other junk that they give you to install. In fact the first thing I did when I had the laptop new was to wipe MCE 2005 off it, and install XP Pro....

April 8, 2008 · 2 min

Flow Layout Panel and Scroll Wheel Problem

I came across a problem while writing an application for my parents today. If you have a FlowLayoutPanel on your form, and have many items in it, causing it to overflow and require scroll bars, you are unable to scroll the control’s content using the mouse wheel. This is somewhat trying in today’s applications, as nearly everyone has a mouse with a scroll wheel, or a track pad on their laptop with a scroll area....

March 29, 2008 · 1 min

VB.NET & C# Fixed height User Controls

Another problem I came across recently was fixed height user controls. Someone at work had created a fixed height user control, by putting the following code in the paint event: Me.Width = 20 Now while for the majority of cases this works, it doesn’t if you dock the control to the left or right of the form, as each time the Layout Engine tries to stick the top of the control to the top of the parent and the bottom of the control to the bottom of the parent, it fires the Paint() event....

March 29, 2008 · 2 min