-
but I have 2 questions. First:
I need to capture the TAB key - basically I have an app that I use to keep track of all my code examples and stuff like that. I have the code stored in files that are opened and placed into a text file. I want the user to be able to use the TAB key to enter an actual TAB into the text box, not jump to the next tab index.
My second question: I've been trying to play with Microsoft's voice recognition controls. I downloaded them several months ago and now can't find where I got them and of course I was too stupid to bookmark the site. The contols are XListen.OCA, XVoice.OCA etc. Has anyone used these? I can't find any help or examples on how to use them. Also, I'm playing with the multimedia control to record wav's and play them but can't get it to actually save the recorded wav. Can anyone give me a good example - all the examples I've found so far don't tell me how to - microsofts help of course just says that I should run the "Save" command but that doens't do anything.
Like said, it's been awhile since I was here, I like some of the new changes. Hope you guys can help me.
Matthew
-
try this......
nerSurfer,
abt ur first question,
This might work, try it out and let me know.
Private Sub Text1_KeyPress(KeyAscii As Integer)
If KeyAscii = vbKeyTab Then
KeyAscii = vbKeySpace
End If
End Sub
This will insert a single space in the textbox when u press the TAB key. U can modify ur code to insert multiple spaces.(I haven't figured out how to do that as yet!)
U'll have to set the TabStop property of the TextBoxes to False for the code to work.
Rammy.
-
I think the activeX's are ocx not oca. I have been searching for somthing like this, can you send me them, so if I you find out how they work, i will reply back to you. Send to [email protected]
Thx
-
i have the exact same files, you can download them from microsoft homepage,
go to the microsoft agent homepage, then go to developer downloads, i think then you an download direct text to speech and voice recognition engines :)
hope this helped,
in other words, i found them on the agent website :)
-
Well, i'm not good at microsoft site, it's hard to find anything there. well i'll try
-
First:
Thanks guys for the answers. THe voice recognition stuff I got looks cool but I can't figure out how to make it work. There wasn't any help files included (except for one about microphones!). Kedaman, if you do figure it out, can you email me at [email protected]. Thanks.
Rammy: The code didn't work. It still tabbed off of the text control. In order for it to work that way I'd have to remove all tab stops on all the controls - which I don't really want to do. What I need to do is intercept the tab call. It fires independantly of the KeyPress/KeyDown events. If I can figure out where it fires, then I can intercept it. I'll keep trying though. Thanks.
By the way, the easiest way to put spaces is: Space(5) - this would insert 5 spaces.
-
Can anyone send those controls or give me a link, i got lost again @ microsofts
-
Kedaman - I would send them to you but I don't remember where I got them and all I have are the OCX's - I don't have the install/setup file so it wouldn't do you any good. Sorry.
Can anyone help me with the Multimedia control?
-
netSurfer,
Sorry the code didn't work. When u figure out how to intercept the TAB key do let me know.
Rammy
-
Simplest thing to do is put a comment in all the methods/events on the control you're trying to work on. Then step through the code in debug to see which event is triggered first and put the appropriate code to fix your problem there. Because a comment is every method/event, you'll be able to step through them all. And it should have zero effect on the compiled code...
-
if you still want the URL for the Microsoft Agent, it is at
http://msdn.microsoft.com/workshop/c...nt/default.asp
Sunny
-
to get the direct speach thingo to speak, just use
Code:
DirectSS1.Speak "Hello"
it's not that hard, but you can also download a help file for amicrosoft agent from the microsoft agent homepage too :)
-
You can find this OCX with a freeware application called ReadPlease2000 at http://www.readplease.com
Kinjal
-
NetSurfer, I had the same problem a while back with the tab key but for different reasons. Nobody was able to tell me how to trap the tab key but I came up with the following work around :
I used the LostFocus event of the control I wanted to use the tab key with, and put in code to determine if the control gaining focus (ActiveControl) was the control with the next TabIndex, and if it was I set focus back to the original control. This means that if I clicked on any other control focus would be set to it, but if I pressed tab the focus would stay on the initial control.
One problem with this was that if you wanted to click on the next control (with the next TabIndex) it would set focus back to the original control. I got round this by setting some boolean values, and doing something with the click event I think. Its a bit hazy, as I can't remember exactly what I did, and I can't look at the code as it is no longer on my machine.
Hope what I said makes some sense and helps in some way. :)
-
MSDN has the foll solution to your TABkey problem.
(under "How to Use TABs in a VB Text Box Without Changing the Focus
")
The form has 3 text boxes Text1,Text2,Text3 with Text.multiline = true
Private Sub Text2_GotFocus()
On Error Resume Next
For i = 0 To Controls.Count - 1
Controls(i).TabStop = False
Next
End Sub
Private Sub Text2_LostFocus()
On Error Resume Next
For i = 0 To Controls.Count - 1
Controls(i).TabStop = True
Next
End Sub
-
Look at this thread. I gave an example of how to use the
voice recognition controls.
http://forums.vb-world.net/showthrea...threadid=16258
-
-
Thanks guys
Thanks for the info. I got the voice thing kinda working - still playing with it. The TAB code did exactly what I needed. Thanks very much. Sorry it took me awhile to actually get back to you guys. I appreciate the help. Talk to you later.
Matthew
-
I know this post is from a while ago, but I just saw it, and I went to the microsoft agent, site but I can't find those controls I've never been able to find anything on the microsoft site lol, is it possible for someone to give me the download url of the controls? or email me them?.
-