Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Disabling Validating event of instance textbox
Message
From
07/12/2010 00:07:37
 
General information
Forum:
ASP.NET
Category:
Other
Environment versions
Environment:
VB 8.0
OS:
Vista
Network:
Windows XP
Database:
Jet/Access Engine
Application:
Desktop
Miscellaneous
Thread ID:
01491759
Message ID:
01491932
Views:
62
>Thanks again bonnie.
>
>BTW is that also the event I would use to translate an "enter" key in a "tab" key. Not sure I like sendkeys to do that.


That would probably be fine Marc ... I haven't had the time to actually test it today though ...

~~Bonnie


>
>>I think you want to use a different event Marc. Try overriding the ProcessDialogKey() method like so:
>>
>>
>>Protected Overrides Function ProcessDialogKey(ByVal keyData As Keys) As Boolean
>>        If ((keyData = Keys.Enter)  _
>>                    AndAlso (Me.Text = "")) Then
>>            Me.OnValidating(New CancelEventArgs)
>>        End If
>>        Return MyBase.ProcessDialogKey(keyData)
>>    End Function
>>
>>
>>
>>~~Bonnie
Bonnie Berent DeWitt
NET/C# MVP since 2003

http://geek-goddess-bonnie.blogspot.com
Previous
Reply
Map
View

Click here to load this message in the networking platform