GT500Shlby Posted July 28, 2003 Posted July 28, 2003 I've searched everywhere for this and cannot find a correct answer. Background: I have 2 forms: 'Form1' as the main form 'InkPad' as a secondary form I launched InkPad by: Dim you as new InkPad you.show() Now I am using a Tablet PC and it has the Ink recognition defined my Microsoft.Ink. In the form InkPad, I have a groupbox which is selected as the Ink object so I can write in it. When I click a button called "translate" I want it to recognize the ink and change it to plain text and put it in a rich text box inside Form1 called 'rtxtComments'. Problem: It's not working correctly. Here is what I have: Private Sub cmdTranslate_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmdTranslate.Click If 0 = myRecognizers.Count Then MessageBox.Show("There are no handwriting recognizers installed. You need to have at least one in order to run this sample.") Else Dim objCont As Form1 objCont.rtxtComments.SelectedText = myInkCollector.Ink.Strokes.ToString If Not myInkCollector.CollectingInk Then myInkCollector.Ink.DeleteStrokes(myInkCollector.Ink.Strokes) gbInkPad.Refresh() End If End If End Sub Now the Ink Recognition itself works. But it won't put the recognized text into the rich text box. Anyone have any ideas? Quote
Leaders dynamic_sysop Posted July 28, 2003 Leaders Posted July 28, 2003 in Form1 : Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Dim you As New InkPad() Me.AddOwnedForm(you) '/// add this line. you.Show() End Sub in the form " InkPad " Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Dim objCont As Form1 = Me.Owner '/// add = Me.Owner objCont.rtxtComments.SelectedText = "some text from me to Form1!" End Sub Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.