Monthly Archives: September 2009

Focus and Validation Order of Events

Two text boxes (TextBox) called A and B. In B’s Validating event, I set e.Cancel = True. While in B, I press TAB, the following events occur. B.Leave B.Validating B.Enter While in B, I click on A, the following events … Continue reading

Posted in Development | Leave a comment

Alt+Right Triggers Check for Alt+Left in ProcessCmdKey

Hm… Protected Overrides Function ProcessCmdKey(ByRef msg As Message, ByVal keyData As Keys) As Boolean If (keyData And Keys.Alt) = Keys.Alt Then If (keyData And Keys.Left) = Keys.Left Then ‘when Alt+Right key is pressed ‘ this executes Debug.WriteLine("WTF!") End If End … Continue reading

Posted in Uncategorized | Leave a comment

ShouldSerialize, Reset, Default, and Property Snippet Methods

Windows Forms Programming, Defining Default Values with the ShouldSerialize and Reset Methods ”’ <summary> ”’ Gets or sets the registry key hive for the MRUKey property. ”’ </summary> <Description("The registry hive where the combo box maintains the MRU list")> _ … Continue reading

Posted in Code Library | Leave a comment