If your goal here is to understand P/Invoke and 'WndProc,' and the use of parameters to P/Invokes ... then great, but, if your goal is to make progress in .NET and WinForms or WPF, then there are other techniques you can use to create an input field that only accepts numeric input that do not require getting 'outside the .NET box.' Check out 'MaskedTextBox' and 'NumericUpDown' in WinForms, for example. best, Bill
"Beauty is in the eye of the beholder, and it may be necessary from time to time to give a stupid or misinformed beholder a black eye." Miss Piggy"