Visual Basic and Dragon NaturallySpeaking.

Steve36445

Well-known member
Joined
Dec 23, 2007
Messages
58
Programming Experience
10+
Visual Basic and Dragon NaturallySpeaking.

I wonder if you can help me please?

I am attempting to write programs to work with dragon NaturallySpeaking.

I am aware that Dragon Is Not designed to be compatible. However, I have had great success with it. For instance if you say what ever is on the Button the button will be pressed.

The problem I have is when I try to show other forms.
In the code below, clicking on a button displays a 2nd form modally.
Clicking on the close button on the 2nd form closes and returns control to form1.
Exactly as it is supposed to.


VB.NET:
Public Class Form1
    Dim return_routine()
    Private Sub Button1_Click(sender As System.Object, e As System.EventArgs) Handles Button1.Click
        Form2.ShowDialog()
        TextBox1.Text = Form2.TextBox1.Text

    End Sub
End Class


Public Class Form2

    Private Sub Button1_Click(sender As System.Object, e As System.EventArgs) Handles Button1.Click
        Me.Close()

    End Sub
End Class
The problem occurs when I try and do this by voice.
Saying the text on the button on the first form show's the 2nd form, instantaneously.
However, saying the text on the button to close the second form does close it but only after about a 20 second delay. It is this delay I am trying to avoid.

If it helps, there are ways around this, I can use a single form and Tab pages or panels.

Also, if I use a button to start a timer and the timer to display the 2nd form, it can be closed immediately. This workaround works but complicates the code significantly.

In that any code that would normally be processed in the button control click event after the show dialogue statement must now be placed in timer-click event.

Ideally I would like to be able to show and close custom dialogue forms by voice without delay.

Thanks,

Steve
 
No replies at all ! In over two months !

I'm not quite sure I understand your problem, however, in Form1 Button1.Click:

Instead of " Form2.ShowDialog()". Have you tried " Form2.Show()" ?

In
Form2 Button1.Click:

You might try: "Me.Hide()".


Poppa.
 
Back
Top