PC SOFT
ONLINE REPOSITORY
FOR WINDEVWEBDEV AND WINDEV MOBILE

Home |  | Sign in | English US
API ON TOP WINDOWS (Janela em primeiro plano sempre)
Published by Boller
in the category Tools
New features



Description
API ONTOP WINDOWS (Janela em primeiro plano sempre)


// Summary: <specify the procedure action>
// Syntax:
//[ <Result> = ] Api_OnTop (<mywin>, <on_off>)
//
// Parameters:
// mywin: <specify the role of mywin>
// on_off:
// Example:
// <Specify a usage example>
//
PROCEDURE Api_OnTop(mywin, on_off)

FunctionReturn is boolean = False
hWnd is system int = Handle({mywin})
hWndInsertAfter is system int = {mywin}
X is int = {mywin}..X
Y is int = {mywin}..Y
cx is int = {mywin}..Width
cy is int = {mywin}..Height
uFlags is int = 0


IF hWnd > 0 THEN

IF on_off = True THEN
hWndInsertAfter = -1
uFlags = 2
ELSE
hWndInsertAfter = -2
uFlags = 0
END

FunctionReturn=API("USER32","SetWindowPos",hWnd,hWndInsertAfter,X,Y,cx,cy,uFlags)

IF ErrorInfo() <> ""
Info(ErrorInfo())
FunctionReturn = False
END

ELSE

Info("Handle nao informado, por favor passe o nome da janela no paramentro inicial!")

END

RESULT FunctionReturn

Illustrations, screen shots
none
none
User reviews
(To evaluate this resource, click 'Write a review')
No review or comment? Be the first one!