|
-
Oct 12th, 2001, 04:13 AM
#1
Thread Starter
New Member
Desperately seeking help on activex
Hi
I have written a control that is basically a text box with a double click event. This event calls a form (which is inside the activex project) The form contains a numeric keypad, when the enter key is pressed I want the value stored in keypad1.output to be passed back for display in the text box. Can this be done? and if so I would be greatful of your help.
Thanks
BigAl
-
Oct 12th, 2001, 08:47 AM
#2
Hyperactive Member
Don't panic!
No one stops you from doing this.
You can do it using the following code in the Text Boxes double click event.
VB Code:
txtBox.Text = frmKeyPad.GetOutPut
What? That form doesn't have a GetOutPut Function? Well, you have to add that then. Here is the function:
VB Code:
'Add a Form Level boolean variable called Cancelled
Public Function GetOutPut() as Integer 'Or whatever data type you need
Cancelled = False
Me.Show vbModal
If Not Cancelled Then
GetOutPut = Me.OutPut 'I am assuming you have the OutPut property populated properly
End If
End Function
'The code for the Ok button's click Event
Private Sub cmdOk_Click()
Unload Me
End Sub
'Code for the Cancel button's click Event
Private Sub cmdCancel_Click()
Cancelled = True
Unload Me
End Sub
Does it look it won't work this way? Why not give it a try? Don't forget to adapt the code.
Cheers.
Abu Haider
____________________________
100% Data Validation for the MS DataGrid Control. Plus Support for Custom and Foreign Lists, DatePicker and much more...
The DataGridEnhancer
I often point to a place where the problem has been discussed, instead of giving you the code that solves it. This is for good, may be you will understand some day...
-
Oct 12th, 2001, 10:09 AM
#3
Thread Starter
New Member
ThankYo
Hi
Thanks Abu, with a little adaptation it now works.
Many Thanks, Once again
BigAl
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
|