Jump to content

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


hot202
 Share

Recommended Posts

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
Link to comment
Share on other sites

#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.

Link to comment
Share on other sites

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.

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...