Sign in to follow this  
Followers 0
Alek

nice guicreate/delete effect

16 posts in this topic

#1 ·  Posted (edited)

it totaly usless but its kinda cool :)

$r = 200
$pi = 3.14159265358979
$x = @DesktopWidth/2
$y = @DesktopHeight/2
$wx = 20
$wy = 20

$Gui = GUICreate("Test",200,400,-1,-1)
GUISetState()
_SpiralEffect($Gui,0)

While 1
    $msg = GUIGetMsg()
    if $msg = -3 then 
        _SpiralEffect($Gui,1)
        ExitLoop
    EndIf
WEnd
Func _SpiralEffect($S_Hwnd,$In_Out = 0)
    $angle = 0
    $Pos_Size = WinGetPos($S_Hwnd)
    if $In_Out = 0 Then
        While 1
            $angle += 10
            If $angle > 360 Then $angle = 0
            Sleep(1)
            $r += 0.1
            WinMove($S_Hwnd,"",$x + ($r * Sin(($pi*2/360)*$angle)), $y + ($r * Cos(($pi*2/360)*$angle)) ,$wx,$wy)
            if $Pos_Size[2] > $wx Then 
                $wx += 2
            EndIf
            If $Pos_Size[3] > $wy Then 
                $wy += 2
            EndIf
            If $Pos_Size[2] <= $wx and $Pos_Size[3] <= $wy Then 
                ExitLoop
            EndIf
            $x -= 0.8
            $y -= 0.8
        WEnd
        Do
            $angle+= 10
            If $angle > 360 Then $angle = 0
            Sleep(1)
            $r += 0.1
            WinMove($S_Hwnd,"",$x + ($r * Sin(($pi*2/360)*$angle)), $y + ($r * Cos(($pi*2/360)*$angle)) ,$wx,$wy)
            $Win_Pos = WinGetPos($S_Hwnd)
            If $Win_Pos[1] < 0 Then WinMove($S_Hwnd,"",$Win_Pos[0],0)
        Until $angle = 180
    ElseIf $In_Out = 1 Then
        For $Angle = 180 to 0 Step -11
            Sleep(1)
            $r += 0.1
            WinMove($S_Hwnd,"",$x + ($r * Sin(($pi*2/360)*$angle)), $y + ($r * Cos(($pi*2/360)*$angle)) ,$wx,$wy)
            $wx -= 2
            $wy -= 2
            $x += 1
            $y += 1
        Next    
        For $p = 1 to 4
            For $Angle = 360 to 0 Step -11
                Sleep(1)
                $r += 0.1
                WinMove($S_Hwnd,"",$x + ($r * Sin(($pi*2/360)*$angle)), $y + ($r * Cos(($pi*2/360)*$angle)) ,$wx,$wy)
                $wx -= 2
                $wy -= 2
                $x += 1
                $y += 1
            Next
        Next
    EndIf
EndFunc
Edited by Alek

[font="Impact"]Never fear, I is here.[/font]

Share this post


Link to post
Share on other sites



i think its really cool! Keep of the good work! :);):P

Share this post


Link to post
Share on other sites

Haha, I like it :)

Share this post


Link to post
Share on other sites

woaw that was fast :) thanks


[font="Impact"]Never fear, I is here.[/font]

Share this post


Link to post
Share on other sites

haha indeed it is cool


A decision is a powerful thing

Share this post


Link to post
Share on other sites

#6 ·  Posted (edited)

It's pretty, I like it. I five starred it.

Edited by Richard Robertson

Share this post


Link to post
Share on other sites

That was an interesting effect. Not totally useless.. it would make for a good presentation. :)

Share this post


Link to post
Share on other sites

Dude.. That is Flippin' Cool!! LOL

Share this post


Link to post
Share on other sites

ok, it now spins until the window is the correct size, so you can now create the gui any size you want the biger it is the longer it will spin :)


[font="Impact"]Never fear, I is here.[/font]

Share this post


Link to post
Share on other sites

That was pretty neat... very nice effect. Keep it up :)

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  
Followers 0