Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Phantom Vertical Scroll Bars
Message
 
To
02/07/2011 15:16:36
General information
Forum:
Visual FoxPro
Category:
Other
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows XP SP2
Network:
Windows XP
Database:
Visual FoxPro
Application:
Desktop
Miscellaneous
Thread ID:
01517074
Message ID:
01517180
Views:
66
This "bleed through" as you describe occurs on any box I run the code on. Here is the function I use to check my spelling:
********************
* function CheckSpelling
* taken from: http://support.microsoft.com/kb/243844

FUNCTION WordCheckSpelling(tcSource)


IF EMPTY(tcSource)
RETURN(tcSource)
ENDIF

DECLARE LONG CoAllowSetForegroundWindow IN ole32.DLL OBJECT, LONG

LOCAL loWord, lcTextToCheck, loTempDoc, lnOrigTop, lcCorrected

m.lcTextToCheck = ALLTRIM(tcSource)
m.loWord = CREATEOBJECT('word.application')

CoAllowSetForegroundWindow(m.loWord, 0)

m.loWord.WINDOWSTATE = 0
m.lnOrigTop = loWord.TOP
m.loWord.TOP = -3000
m.loWord.VISIBLE = .T.
m.loTempDoc = loWord.Documents.ADD()

loWord.ACTIVATE()

_CLIPTEXT = lcTextToCheck

WITH loTempDoc
.Content.Paste
.ACTIVATE()
.CheckSpelling()
&& After the user has made changes, use the clipboard to
&& transfer the contents back to the text box
.Content.COPY
lcCorrected = _CLIPTEXT
&& Close the document and exit Word
.Saved = .T.
.CLOSE()
ENDWITH

m.loTempDoc = .NULL.

m.loWord.QUIT()

m.loWord = .NULL.

CLEAR DLLS

RETURN(lcCorrected)

********************
Driving toward a Tactical Edge
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform