Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Spell check Issue in Powerbuilder 11.5 with Vista.

283 views
Skip to first unread message

vidhyadaran.A

unread,
Sep 16, 2009, 3:49:43 AM9/16/09
to

Hi

I am recently upgrade the OS XP to Vista. My powerbuilder
version is
11.5.1.


I had a problem with many windows a problem related to
spellcheck.
Spellcheck dialogue box does not come in front but is behind
the my
application, Alt + Tab is used as a workaround it is working
fine.


But we didn't facing the above problem in XP OS.
The problem is occured only for Vista OS.


Does any one have facing the releated issue?


Herewith I am attaching the Source Code


Window Name - W_emp_appl_id
Window Function Name - Wf_spell_check


Window Function Code:


string ls_text
nvo_word_toolkit lnvo_word


If lnvo_word.SpChk_Init() = 1 Then
ls_text = dw_detail.Object.eai_notes[1]
If Len(ls_text) > 0 Then
lnvo_word.SpChk_Check(ls_text)
dw_detail.Object.eai_notes[1] = ls_text
End If
// close Word/OLE object
lnvo_word.SpChk_Close()


//SpChk_Init() Code:


Long ll_RC
IF NOT IsWord() THEN RETURN -1
SetPointer( HourGlass! )
iole_SpChk = CREATE OleObject
ll_RC = iole_SpChk.ConnectToNewObject( 'Word.Application'
)


IF ll_RC <> 0 THEN
DESTROY iole_SpChk
RETURN ll_RC
END IF
RETURN 1
End if


//spchk_check Code


SetPointer( HourGlass! )


Long ll_return,ll_len,ll_counter
String ls_replace
iole_SpChk.Application.Visible = False
iole_SpChk.Application.WindowState = 2
iole_SpChk.Documents.Add()
iole_SpChk.Selection.TypeText( as_Text )
iole_SpChk.Selection.HomeKey()
iole_SpChk.Selection.MoveStart()
iole_SpChk.ActiveDocument.CheckSpelling()
iole_SpChk.ActiveDocument.Select()
as_Text = iole_SpChk.Selection.Text
iole_SpChk.ActiveDocument.Close( False )
RETURN 1


//SpChk_Close - Code


iole_SpChk.Application.Quit
iole_SpChk.DisconnectObject()
DESTROY iole_SpChk
RETURN 1


Thanks
vidhyadaran.A

ecarlson

unread,
Oct 6, 2009, 11:59:20 AM10/6/09
to
The same thing happens in Windows 2008, and it is a bigger problem
when running the app via Terminal Services as a RemoteApp, because you
can't simply Alt-Tab to the spell check window. I'm also interested in
a solution to the spell check window appearing behind the Powerbuilder
app in later versions of Windows. I'm using PowerBuilder 10.5.2, so
the issue doesn't appear to be specific to any version of PowerBuilder.

Bruce Armstrong

unread,
Oct 6, 2009, 7:55:57 PM10/6/09
to

The problem is with using Word to do your spell checking for you. Stop
doing that, and you'll be fine. Use a third party control that is
designed to do it.

-----------------------------------

My Web 2.0 Stuff

Blog: http://bruce.pbdjmagazine.com/
Facebook: http://www.facebook.com/people/Bruce-Armstrong/1600223798
Fotki: http://public.fotki.com/brucearmstrong/
LinkedIn: http://www.linkedin.com/in/bruceaarmstrong
Twitter: http://twitter.com/bruce_armstrong
YouTube: http://www.youtube.com/user/brucearmstrong

vidhyadaran.A

unread,
Oct 19, 2009, 2:41:52 AM10/19/09
to

Is there any alternate way without using Third party
control?

So PB11.5.1 is not vista certified right?


Thanks
Vidhyadaran.A

Bruce Armstrong

unread,
Oct 19, 2009, 10:15:56 AM10/19/09
to

You are launching a seperate application in order to do the spell
check. Vista handles that differently than other OSes. This has
nothing to do with PowerBuilder, but with how you coded it. Use a
third part control, one that runs in the same process, and you won't
have the problem.

Roz

unread,
Dec 22, 2009, 3:11:48 PM12/22/09
to
You will need these two external functions.

FUNCTION ulong FindWindow ( ref string lpClassName, ref string
lpWindowName) Library "USER32.DLL" ALIAS FOR "FindWindowW"

FUNCTION boolean SetForegroundWindow (uLong hWindow) Library "USER32.DLL"

Do your normal setup for ole.
In your code before you do checkspelling add the following:

ulong l_handle
string ls_name, ls_name
setNull(ls_null)

ls_name = "OpusApp"
l_handle = FindWindow(ls_name, ls_null)
If 0 <> l_handle Then SetForegroundWindow (l_handle)

<vidhyadaran.A> wrote in message news:4ab09897.20...@sybase.com...

0 new messages