Well I didn't have a lot of responses, so I've done some research over the
last couple of days, and here is what I've found. This would work great,
except for the fact that when you use ComboBoxStyle.DropDown, then the KeyUp
message isn't passed!!! (It does pass under ComboBoxStyle.DropDownList). So
I am still stuck after 2 days of work.
Any help would be greatly appreciated.
I sincerely hope that microsft makes this process easier in the future.
Ironically, doing these sorts of data entry screens was trivial in MS access
97! Have we regressed??!??
private const int WM_KEYUP = 0x101;
// The WndProc method corresponds exactly to the Windows WindowProc
function.
// For more information about processing Windows messages, see the
WindowProc
// function documentation in the Windows Platform SDK reference located in
// the MSDN Library.
protected override void WndProc(ref System.Windows.Forms.Message theMessage)
{
// Ignore KeyUp event to avoid problem with tabbing the dropdown.
if (theMessage.Msg == WM_KEYUP)
{
return;
}
else
{
base.WndProc(ref theMessage);
}
}
The Keyup event from the tab key is causing it to "skip" over the cell that
has the combobox, so several people use this method
> Hi all
>
[quoted text clipped - 16 lines]
>
> .NET FRAMEWORK 1.1
jereviscious - 29 Feb 2008 14:17 GMT
Finally, the solution...
private const int WM_KEYUP = 0x101;
// The WndProc method corresponds exactly to the Windows WindowProc
function.
// For more information about processing Windows messages, see the
WindowProc
// function documentation in the Windows Platform SDK reference located in
// the MSDN Library.
public override bool PreProcessMessage(ref System.Windows.Forms.Message
theMessage)
{
// Ignore KeyUp event to avoid problem with tabbing the dropdown.
if (theMessage.Msg == WM_KEYUP)
{
return true;
}
else
{
base.WndProc(ref theMessage);
}
return false;
> Well I didn't have a lot of responses, so I've done some research over the
> last couple of days, and here is what I've found. This would work great,
[quoted text clipped - 66 lines]
>>
>> .NET FRAMEWORK 1.1