Jump to content
Sign in to follow this  
AlainB

Keeping SplashText PopUp within The Form

Recommended Posts

AlainB

Hi,

How could I keep the PopUp of the "SplashTextOn" within the Form created. There will be many instances of the script running at the same time and each one could be located anywhere on the screen.

Or is there another way of getting the same effect?

Thanks!

Alain

#include <GUIConstantsEx.au3>

#include <WindowsConstants.au3>

$Form1 = GUICreate("SplashText test", 288, 284,-1,-1, -1,$WS_EX_TOPMOST)

$Button1 = GUICtrlCreateButton("Test", 92, 8, 57,21)

GUISetState(@SW_SHOW)

While 1

$nMsg = GUIGetMsg()

Switch $nMsg

Case $GUI_EVENT_CLOSE

Exit

Case $Button1

SplashTextOn ( "", "Splash Text On!",200,40,-1,-1,1,"",10,500)

sleep(2000)

SplashOff()

EndSwitch

WEnd

Share this post


Link to post
Share on other sites
AlainB

My problem is solved. "WinGetPos" was the key.

#include <GUIConstantsEx.au3>

#include <WindowsConstants.au3>

$Form1 = GUICreate("SplashText test", 288, 284,-1,-1, -1,$WS_EX_TOPMOST)

$Button1 = GUICtrlCreateButton("Test", 92, 8, 57,21)

GUISetState(@SW_SHOW)

While 1

$nMsg = GUIGetMsg()

Switch $nMsg

Case $GUI_EVENT_CLOSE

Exit

Case $Button1

$Pos = WinGetPos("[active]")

SplashTextOn ( "", "Splash Text On!",200,40,$Pos[0]+44,$Pos[1]+132,1,"",10,500)

sleep(2000)

SplashOff()

EndSwitch

WEnd

Edited by AlainB

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×