|
-
Feb 8th, 2002, 06:39 PM
#1
Thread Starter
Junior Member
Keypress error with user control
I am having a strange problem.
I am trying to pass a Keypress from a text box in a user control I developed to the form.
Evertime I add
Private Sub txtDate_KeyPress(KeyAscii As Integer) to the form code and run the program i get the following error:
"Interface not valid for Implements"
I have never seen this before. Any help appreciated
Some code:
In beginning of User Control
'Event Declarations:
Event KeyPress(KeyAscii As Integer) 'MappingInfo=TextBox,TextBox,-1,KeyPress
Event KeyDown(KeyCode As Integer, Shift As Integer) 'MappingInfo=TextBox,TextBox,-1,KeyDown
Event Validate(Cancel As Boolean) 'MappingInfo=TextBox,TextBox,-1,Validate
Further down in User Control
Private Sub TextBox_KeyPress(KeyAscii As Integer)
RaiseEvent KeyPress(KeyAscii)
End Sub
In Form Code
Private Sub txtDate_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then Call FilterSub
End Sub
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
|