Jump to content
Sign in to follow this  
hot202

slide out from right of desktop. Image/buttons flash on win7

Recommended Posts

hot202

hi i have a problem with this script it seems to work on my xp computer with out any flashing but as soon as i ran it on my computer with windows7 the background image flashes then comes bak same as buttons. Is there any thing that can be done with fixing this? as i really want my gui to slide from out of the screen so its not in the way. Thanks 4 the help.

#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#include <StaticConstants.au3>

$GUI = GUICreate("Window Slide In", 338, 258, @DesktopWidth - 1, @DesktopHeight - 320, $WS_POPUP)
WinSetOnTop($GUI,"",1)
$Input1 = GUICtrlCreateInput("Test", 72, 125, 185, 21)

$n = GUICtrlCreatePic(@ScriptDir & "\Background.bmp", 0, 0, 338, 258, BitOR($SS_NOTIFY,$WS_GROUP,$WS_CLIPSIBLINGS))
GUISetState()
$WPos = WinGetPos($GUI)

While 1
    Sleep(100)
    $MPos = MouseGetPos()
    If ($MPos[0] >= $WPos[0]) And ($MPos[0] <= ($WPos[0] + $WPos[2])) And _
            ($MPos[1] >= $WPos[1]) And ($MPos[1] <= ($WPos[1] + $WPos[3])) Then
        WinMove($GUI, "", @DesktopWidth - 338, @DesktopHeight - 320, 338, 258, 3)
    ElseIf ($MPos[0] < $WPos[0] - 300) Or ($MPos[0] > ($WPos[0] + $WPos[2])) Or _
        ($MPos[1] < $WPos[1]) Or ($MPos[1] > ($WPos[1] + $WPos[3])) Then
        WinMove($GUI, "", @DesktopWidth - 1, @DesktopHeight - 320, 338, 258, 3)
    EndIf
    If GUIGetMsg() = -3 Then Exit
WEnd

Share this post


Link to post
Share on other sites
BrettF
BrettF

#include <GUIConstantsEx.au3>

#include <WindowsConstants.au3>

#include <StaticConstants.au3>

$GUI = GUICreate("Window Slide In", 338, 258, @DesktopWidth - 1, @DesktopHeight - 320, $WS_POPUP)

$n = GUICtrlCreatePic(@ScriptDir & "\Background.bmp", 0, 0, 338, 258, BitOR($SS_NOTIFY,$WS_GROUP,$WS_CLIPSIBLINGS))

GUICtrlSetState ($n, $GUI_DISABLE)

$Input1 = GUICtrlCreateInput("Test", 72, 125, 185, 21)

WinSetOnTop($GUI,"",1)

GUISetState()

$WPos = WinGetPos($GUI)

While 1

Sleep(100)

$MPos = MouseGetPos()

If ($MPos[0] >= $WPos[0]) And ($MPos[0] <= ($WPos[0] + $WPos[2])) And _

($MPos[1] >= $WPos[1]) And ($MPos[1] <= ($WPos[1] + $WPos[3])) Then

WinMove($GUI, "", @DesktopWidth - 338, @DesktopHeight - 320, 338, 258, 3)

ElseIf ($MPos[0] < $WPos[0] - 300) Or ($MPos[0] > ($WPos[0] + $WPos[2])) Or _

($MPos[1] < $WPos[1]) Or ($MPos[1] > ($WPos[1] + $WPos[3])) Then

WinMove($GUI, "", @DesktopWidth - 1, @DesktopHeight - 320, 338, 258, 3)

EndIf

If GUIGetMsg() = -3 Then Exit

WEnd

Please don't PM me again.

Share this post


Link to post
Share on other sites
hot202

would any1 be able to tell me what i need to add and how?

Share this post


Link to post
Share on other sites
hot202

ok thanks man. It works fine on my computer with XP but not on my win7 computer not sure why. Thats why i thouht there was something wrong with the script or thought something could be changed to fix it.

Share this post


Link to post
Share on other sites
BrettF
FaT3oYCG

You could try using an extended style for the gui which I was pointed towards the other day which solved my problem, here is the response I got:

http://www.autoitscript.com/forum/index....wtopic=109092&st=0&p=768115&#entry768115

Edited by FaT3oYCG

Interpreters have great power!Although they live in the shadow of compiled programming languages an interpreter can do anything that a compiled language can do, you just have to code it right.

Share this post


Link to post
Share on other sites
hot202

i cant get this working with AnimateWindow can some 1 please show me how i change everything but the window just dont slide in or move.

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  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.