Targeted
Navigation:

Technology All The Way
Iodid Weblogs
 

Standard
Navigation:

Home
FAQ
Search
Table of Contents

Email:

TryandGuess
-at-
iodid.com

Search this weblog:


Visitor Count:
Money Grubbing:

Amazon Honor System Click Here to Pay Learn More

Terms of Use

June 07, 2003

Manipulating Word and Its SpellChecker pt. 1

Now that I have the handle for Word I need to make use of the Topmost function to raise it above the others. I found this page to be helpful:

VB TopMost Function

The most useful parts are:


Public Const HWND_TOPMOST = -1
Public Const HWND_NOTOPMOST = -2
Public Const SWP_NOMOVE = &H2
Public Const SWP_NOSIZE = &H1
Public Const SWP_NOACTIVATE = &H10
Public Const SWP_SHOWWINDOW = &H40
Public Const TOPMOST_FLAGS = SWP_NOMOVE Or SWP_NOSIZE
Public Declare Function SetWindowPos Lib "user32" (ByVal hwnd As Long, ByVal hWndInsertAfter As Long, ByVal x As Long, y, ByVal cx As Long, ByVal cy As Long, ByVal wFlags As Long) As Long

Public Sub MakeTopMost(Handle As Long)
SetWindowPos Handle, HWND_TOPMOST, 0, 0, 0, 0, TOPMOST_FLAGS
End Sub

Public Sub MakeNormal(Handle As Long)
SetWindowPos Handle, HWND_NOTOPMOST, 0, 0, 0, 0, TOPMOST_FLAGS
End Sub

Posted by tmichael at June 7, 2003 02:33 PM
Comments
Post a comment