-
Oct 13th, 2006, 06:24 AM
#1
Thread Starter
Lively Member
What exactly do e.keychar and e.handle mean?
I use these 2 terms a lot in my code. I think e.handle is Error Handler? But I don't know what Key Char is. So if I had the code:
VB Code:
If Char.IsNumber(e.keychar) = False andalso Char.IsControl(e.keychar) = False Then
e.handled = true
End if
Could someone explain each part of this line of code to me? I really don't understand it, and I really want to understand it.
Thanks
-
Oct 13th, 2006, 06:29 AM
#2
Re: What exactly do e.keychar and e.handle mean?
Try to look at msdn
Link at my signature
Look Here For Both Property
-
Oct 13th, 2006, 10:55 AM
#3
Re: What exactly do e.keychar and e.handle mean?
e.KeyChar is the char that was pressed on the keyboard, if you set e.Handled to true that means you've handled the event yourself and dont need the control to finish handling the event
-
Oct 13th, 2006, 10:55 AM
#4
Re: What exactly do e.keychar and e.handle mean?
e is the argument passed in to the event. For the KeyPress event e can determine the key being pressed. Also, e.Handled = True means to cancel the event or that your handling the event in your code instead.
VB Code:
... e As System.Windows.Forms.[b]KeyPressEventArgs[/b]
VB/Office Guru™ (AKA: Gangsta Yoda™ ®)
I dont answer coding questions via PM. Please post a thread in the appropriate forum.
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it!
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|