Jump to content

Recommended Posts

Posted

I mean like displaying a image, with txt over it, hooked to a certin point on a window. Like the version part of d2jsp. It displays a bmp, at the top of the screen, then displays the text of the version number on it.

Posted

$WINDOW_NAME = "MyGUI"
$SPLASH_TITLE = "Splash"
$SPLASH_IMAGE = "image.bmp"
$SPLASH_WIDTH = 100
$SPLASH_HEIGHT = 100
while 1
   if not WinExists($WINDOW_NAME) Then 
      SplashOff()
   else
      $loc = WinGetPos ( $WINDOW_NAME )
      SplashImageOn ( $SPLASH_TITLE, $SPLASH_IMAGE , $SPLASH_width , $SPLASH_height ,($loc[2]-$SPLASH_WIDTH)/2+$loc[0], ($loc[3]-$SPLASH_HEIGHT)/2+$loc[1])
  endif
  sleep (2000)
wend

AutoIt is simple, subtle, elegant.

Then you create the GUI in C++, and enter the name into the $WINDOW_NAME variable.

Posted (edited)

That Works Great!!!

only is there a way to cut down the flicker, and still have it work fast...

as in Sleep(100), it flickers more, but reacts faster and Sleep(5000) it flickers less, but reacts slower.

can this be fixed.

like,

$loc2 = WinGetPos($WINDOW_NAME)
If $loc2[0] = $loc[0] Then
 ;;; Do Nothing
Else
   SplashImageOn ( $SPLASH_TITLE, $SPLASH_IMAGE , $SPLASH_width , $SPLASH_height ,($loc[2]-$SPLASH_WIDTH)/2+$loc[0],$loc[1]+($SPLASH_HEIGHT*1.45),1)
EndIf
If $loc2[1] = $loc[1] Then
 ;Do Nothing
Else
   SplashImageOn ( $SPLASH_TITLE, $SPLASH_IMAGE , $SPLASH_width , $SPLASH_height ,($loc[2]-$SPLASH_WIDTH)/2+$loc[0],$loc[1]+($SPLASH_HEIGHT*1.45),1)
EndIf

would this work?

Yes it does, i just tryed it... Works Great. Thank you

Edited by Naufuge

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
×
×
  • Create New...