sorry. I should have not included ASP.NET. This is a .NET desktop app.
HLRosenberger
ASKER
Or what if I create my own little form which is a "keypad", and do a Sendkeys? The problem I am running into is that Sendkeys send to the active window, so how do I click a button on my form with the form getting focus?
I have a simple form working. I can use SendKeys to enter data to the active window, like Wordpad or Excel or Word. I use the code shown below to prevent the form from being "active".
However the point of creating this numeric keypad is to use it within my own app. But it does not work, in that when I click a button on my keypad form, my app loses focus. How can I prevent that? See image.
Protected Overrides ReadOnly Property ShowWithoutActivation As Boolean
Get
Return True
End Get
End Property
Protected Overrides ReadOnly Property CreateParams As System.Windows.Forms.CreateParams
Get
Const WS_EX_NOACTIVATE As Integer = &H8000000
Dim params As CreateParams = MyBase.CreateParams
params.ExStyle = params.ExStyle Or WS_EX_NOACTIVATE
Return params
End Get
End Property
Private Sub Class1_Load(sender As System.Object, e As System.EventArgs) Handles MyBase.Load
http://a.kabachnik.info/jquery-numpad.html