Announcement

Collapse
No announcement yet.

Application fade-in_out

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • RizlaUK
    replied
    put this in your global functions, no need to call the function as its called automaticly by AMS

    Code:
    function QueryAllowProjectClose()
    	local handle = Application.GetWndHandle();
    	local Opacity=255
    		for i = 0, 255 do
    			Opacity = Opacity - 5
    			DLL.CallFunction("AutoPlay\\Docs\\wTrans.dll", "SetWindowTransparency", handle..","..Opacity, DLL_RETURN_TYPE_LONG, DLL_CALL_STDCALL)
    			if Opacity == 0 then break end
    		end
       return true;
    end

    Leave a comment:


  • Delta
    replied
    Hi!
    i tried this sample:
    Originally posted by Worm View Post
    I originally did it with a timer to not stall the app
    how do i make it fade out on exit same way as it fading in?
    it's always shutting down not fading down...

    Leave a comment:


  • thachsn1
    replied
    Looks like fun

    I will try to whip something up if possible..
    Because that web example looked rather interesting.
    It would be a neat tool to have.

    Leave a comment:


  • FoxLeader
    replied
    thachsn1 >> this was just an exemple to show the principle of getting the movement. The goal to reach is that: http://myscraproom.net/ (but this one is in javascript, to goal is to get this to work in AMS with Lua)

    Leave a comment:


  • thachsn1
    replied
    Bad apz

    File would not load.

    Leave a comment:


  • Worm
    replied
    I originally did it with a timer to not stall the app
    Attached Files

    Leave a comment:


  • thachsn1
    replied
    Picture flow

    Is this what your trying to do "FoxLeader" ?
    Last edited by thachsn1; 04-27-2008, 10:27 PM.

    Leave a comment:


  • Intrigued
    replied
    I took that post I did there and here is the fade in and out of the AMS window:

    http://www.indigorose.com/forums/showthread.php?t=23663

    Leave a comment:


  • FoxLeader
    replied
    Hmmm... cool, but as I said, that didn't had anything to do with what he posted. Ex of what I got from his code:

    Instead of
    Code:
    while (op < 255) do
    -- Do something here
    op = op + 1; --- (change this number to change speed)
    DLL.CallFunction("AutoPlay\\Docs\\wTrans.dll", "SetWindowTransparency", handle..","..op, DLL_RETURN_TYPE_LONG, DLL_CALL_STDCALL)
    end
    I would use
    Code:
    while (op < 255) do
            -- Do something here
            op = op + 1; --- (change this number to change speed)
            Image.SetPos("PictureFlow", oldPos.X * factor, oldPos.Y * factor)
    end
    ...but that way, I can't to multiple things at multiple speeds cause one "while" freeze the whole app.

    Leave a comment:


  • Intrigued
    replied
    Originally posted by RizlaUK View Post
    yup, AMS single threaded dll calls are a bit of a pain, i might see what i can turn up on the activex side of window animation, see if its any better


    mental note: stop having ideas....havent got time
    PureBasic option that you could work into something:

    Code:
    [SIZE="2"]WindowFx(Id,ms,fx) Previous Top Next  
    
    --------------------------------------------------------------------------------
    
    Author : Paul Leischow
    
    
    Description :
    
    
    Cool window FX for your apps (fade in/out, slide,wipe) / For creating LaunchBar
    
    
    id = WindowId(hwnd)
    ms = delay for WindowsFx
    Fx = Effect you want 
    
    
    Use these constants for fx ( Pipe Allowed )
    
    
    #AW_HOR_POSITIVE = $1 ; Animates the window from left To right. This flag can be used with roll Or slide animation.
    #AW_HOR_NEGATIVE = $2 ; Animates the window from right To left. This flag can be used with roll Or slide animation.
    #AW_VER_POSITIVE = $4 ; Animates the window from top To bottom. This flag can be used with roll Or slide animation.
    #AW_VER_NEGATIVE = $8 ; Animates the window from bottom To top. This flag can be used with roll Or slide animation.
    #AW_CENTER = $10      ; Makes the window appear To collapse inward If AW_HIDE is used Or expand outward If the AW_HIDE is not used.
    #AW_HIDE = $10000     ; Hides the window. By default, the window is shown.
    #AW_ACTIVATE = $20000 ; Activates the window.
    #AW_SLIDE = $40000    ; Uses slide animation. By default, roll animation is used.
    #AW_BLEND = $80000    ; Uses a fade effect. This flag can be used only If hwnd is a top-level window.
    
    
    Example :
    
    
    ;/ no. 1 Test   
    OpenWindow(0,0,0,100,768,#PB_Window_SystemMenu|#PB_Window_Invisible,"Window FX")
    WindowFx(WindowID(),500,#AW_HOR_POSITIVE|#AW_SLIDE|#AW_ACTIVATE)
    WaitUntilWindowIsClosed()
    AnimateWindow_(WindowID(),500,#AW_HOR_NEGATIVE|#AW_SLIDE|#AW_HIDE)
    Delay(500)
    
    
     
    ;/ no. 2 Test   
    OpenWindow(0,0,0,1024,100,#PB_Window_SystemMenu|#PB_Window_Invisible,"Window FX")
    WindowFx(WindowID(),500,#AW_VER_POSITIVE|#AW_SLIDE|#AW_ACTIVATE)
    WaitUntilWindowIsClosed()
    AnimateWindow_(WindowID(),500,#AW_VER_NEGATIVE|#AW_SLIDE|#AW_HIDE)
    Delay(500)
    
    
    ;/ no. 3 Test
    OpenWindow(0,0,0,200,200,#PB_Window_SystemMenu|#PB_Window_Invisible|#PB_Window_ScreenCentered,"Window FX")
    WindowFx(WindowID(),1000,#AW_BLEND|#AW_ACTIVATE)
    WaitUntilWindowIsClosed()
    AnimateWindow_(WindowID(),1000,#AW_BLEND|#AW_HIDE)
    Delay(500)[/SIZE]
    (source: Droopy Library v1.30.10 (24/1/2008))
    Last edited by Intrigued; 04-27-2008, 09:08 PM.

    Leave a comment:


  • thachsn1
    replied
    I'm lost, how are you using the code.
    Because I have used it in many scenario's
    and have had no bugs at all.
    I need to know what your coding, and how your coding it.
    Slide style animation ran through a while loop can be memory taxing and unstable.
    This code was only intended for opacity fading.
    Last edited by thachsn1; 04-27-2008, 08:08 PM.

    Leave a comment:


  • RizlaUK
    replied
    yup, AMS single threaded dll calls are a bit of a pain, i might see what i can turn up on the activex side of window animation, see if its any better


    mental note: stop having ideas....havent got time

    Leave a comment:


  • FoxLeader
    replied
    In fact, it isn't exactly what I wanted since it freezes the whole app... that was a try.

    Leave a comment:


  • thachsn1
    replied
    If I can be of help I will be of help...

    Leave a comment:


  • FoxLeader
    replied
    Man, I love you!

    You solved a problem that didn't had anything to do with this, but you solved it anyway!
    I was looking for a way to do some animations without timers. And that works.

    Thanks! <3

    Leave a comment:

Working...
X