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
-----------------------------------
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
So PB11.5.1 is not vista certified right?
Thanks
Vidhyadaran.A
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...