Help copying text from paltalk 9.2 edit box

You can talk about VB programming here

Help copying text from paltalk 9.2 edit box

Postby method » Thu Oct 11, 2007 4:15 am


Hi all . could any one show me how i can copy the text that i just wrote in paltalk edit box before sending it to main by pressing for example F1. After sending F1 i want to use word to do spell check over it. i have already done it for vb6 edit box but not sure how to do it for paltalk. Hope some one help me.Thanks


Code: Select all
Private Sub Command2_Click()
Dim objWord As Object
Dim objDoc  As Object
Dim strResult As String        'Create a new instance of word Application
Set objWord = CreateObject("word.Application")
Select Case objWord.Version        'Office 2000
Case "9.0"
Set objDoc = objWord.Documents.Add(, , 1, True)        'Office XP
Case "10.0"
Set objDoc = objWord.Documents.Add(, , 1, True)
'Office 97
Case Else ' Office 97
Set objDoc = objWord.Documents.Add
End Select
objDoc.Content = Text1.Text
objDoc.CheckSpelling
strResult = Left(objDoc.Content, Len(objDoc.Content) - 1)
If Text1.Text = strResult Then        ' There were no spelling errors, so give the user a
' visual signal that something happened
MsgBox "The spelling check is complete.", vbInformation + vbOKOnly
End If        'Clean up
objDoc.Close False
Set objDoc = Nothing
objWord.Application.Quit True
Set objWord = Nothing     ' Replace the selected text with the corrected text.It 's important that    ' this be done after the "Clean Up" because otherwise there are problems    ' with the screen not repainting
Text1.Text = strResult
Exit Sub
End Sub
method
imFiles Master
imFiles Master
 
Posts: 686
Joined: Tue Oct 18, 2005 11:12 am

Re: Help copying text from paltalk 9.2 edit box

Postby Chike » Thu Oct 11, 2007 9:42 pm

For plain text WM_GETTEXT message should work. How to set the text back with the original color I am not sure. I am guessing EM_REPLACESEL message but never tried it.
On how to find the edit control, you'll have to look in code examples or programs code posted on this board.
Image
Chike
imFiles Master
imFiles Master
 
Posts: 583
Joined: Sun May 13, 2007 6:20 pm

Re: Help copying text from paltalk 9.2 edit box

Postby method » Fri Oct 12, 2007 7:54 am

chike i am not worried abut the text color . So could your or any one else show me how to copy paltalk editbox typed text and send it to word for spell checking and paste back the final text? i don't know how to use WM_GETTEXT!!
method
imFiles Master
imFiles Master
 
Posts: 686
Joined: Tue Oct 18, 2005 11:12 am

Re: Help copying text from paltalk 9.2 edit box

Postby autopilot » Fri Oct 12, 2007 2:42 pm

method wrote:i don't know how to use WM_GETTEXT!!
using google will give you all the info you need to use sendmessage and wm_gettext
User avatar
autopilot
Forum Moderator
Forum Moderator
 
Posts: 358
Joined: Sat Sep 23, 2006 7:19 pm


Return to Visual Basic Programming

 


  • Related topics
    Replies
    Views
    Last post

Who is online

Users browsing this forum: No registered users and 0 guests