Home Upgrade Search Memberlist Extras Hacker Tools Award Goals Help Wiki Contact

.NET 

Animated Notification Form

OMG, I've been looking all over for this! I've needed it for a few of my applications, beats using the old Notification Icon :P

Thanks a lot
Awesome! I wish it had full source though. Lol
(Dec 3, 2013 12:06 PM)SubGenius Wrote:  I didn't want to make a new thread for this, people might say i am leeching your work, I am contributing.
I have coded an advanced version of yours, without threadings, using a timer.

What's New.
  • PopUp Window Template Included
  • Pending List
  • Fade in - Fade out Support
  • Walk In - Walk out Support
  • Show popup in every corner of your screen
  • Visibility time can be changed.
  • Source code fully commented

Documentation
How to add :
  • Create a visual basic project
  • Add an empty class file
  • Put the code inside
  • Build the solution

To Create a popup from the template look at the example:
Code
Sub ShowPopUp
Dim popUpManager As New AdvancedPopUpManager
  Dim WindowPopUp As New AdvancedPopUpManager.PopUpWindow(New PopUpWindowTemplate("Title-Test", "Write Something", True)) With {.secondsVisible = 4, .startLocation = AdvancedPopUpManager.PopUpWindow.StartLocationEnum.UpRight, .type = AdvancedPopUpManager.PopUpWindow.PopUpTypeEnum.FadeIn_FadeOut}
  popUpManager.ShowPopUp(WindowPopUp)

You can replace the template with every form of your preference.

Available Methods:

ShowPopUp ---> Shows a new popup window without adding to pending list.
AddNewPopUp ---> Adds a new popup window to the pending list
ShowNextPopUp ---> Use this to start showing the the popups in the pending list
ClearPendingPopUps ---> Deletes all panding popups

Notes
If there is a popup being showed and you add or show a new popup, the new popup is going to be showned only after the previous popup has ended.

If the user closes the popup form , the timer will continue to work and the pending list will continue to show the popups.

The Code:
http://pastebin.com/XLJuHfkj#

How to add it into my main application form?
(Dec 4, 2013 08:19 AM)glaca99xd Wrote:  How to add it into my main application form?

Download this project and you will understand how it works.
Here

Double click the class file to edit the template form.

if you want to use your own form look at this:
Code
Dim WindowPopUp As New AdvancedPopUpManager.PopUpWindow(New YourFormNameHere) With {.secondsVisible = 4, .startLocation = AdvancedPopUpManager.PopUpWindow.StartLocationEnum.DownLeft, .type = AdvancedPopUpManager.PopUpWindow.PopUpTypeEnum.FadeIn_FadeOut}
  popUpManager.ShowPopUp(WindowPopUp)

change the YourFormNameHere with the form you want to animate.
(Dec 1, 2013 11:28 AM)Nervo Wrote:  Well, today I was playing around with forms and animations and I came up with this:

Preview:
Spoiler (Click to View)

It's a simple animation you can use with your rat or whatever you want.
The form design is up to you, I made this just to show how it works.

Source:
PHP Code

<?php 
Imports System
.Threading
Public Class Form1

    
Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
  Dim t 
As New Thread(AddressOf MoveForm)
  
t.Start()
    
End Sub

    Delegate Sub MoveFormDel
()
    Public 
Sub MoveForm()
  If 
InvokeRequired = True Then
    Invoke
(New MoveFormDel(AddressOf MoveForm))
  Else
    
Dim x As Integer = Screen.PrimaryScreen.WorkingArea.Width - Me.Width
    Dim y 
As Integer = Screen.PrimaryScreen.WorkingArea.Height
    
Do While y <> Screen.PrimaryScreen.WorkingArea.Height - Me.Height
    y 
-= 1
    Me
.Location = New Point(x, y)
    
Me.Refresh()
    
Threading.Thread.Sleep(10)
    
Loop
    Threading
.Thread.Sleep(1000)
    Do While 
Me.Opacity <> 0
    Me
.Opacity -= 0.01
    Threading
.Thread.Sleep(20)
    
Loop
  End 
If
    
End Sub
End 
Class 

Have fun! 🤝
can i just get the code for the fade out ✌
(Dec 4, 2013 02:18 PM)GHD124 Wrote:  can i just get the code for the fade out ✌

Here you go:
PHP Code

<?php 
Do While Me.Opacity <> 0
    Me
.Opacity -= 0.01
    Threading
.Thread.Sleep(10)
  
Loop 
"Never be a spectator of unfairness or stupidity. Seek out argument and disputation for their own sake; the grave will supply plenty of time for silence." - C.H.
(Dec 4, 2013 02:28 PM)Nervo Wrote:  Here you go:
PHP Code

<?php 
Do While Me.Opacity <> 0
    Me
.Opacity -= 0.01
    Threading
.Thread.Sleep(10)
  
Loop 

is there a way to make it so when it reaches the lowest possible opacity it will make that form close or open a new form? 🤝
Put an If statement inside the Do While like:

Code
If Me.Opacity = 0 then
Me.close()
End If
(Dec 4, 2013 03:11 PM)He B TeMy Wrote:  Put an If statement inside the Do While like:

Code
If Me.Opacity = 0 then
Me.close()
End If

Code
Do While Me.Opacity <> 0
        Me.Opacity -= 0.01
        Threading.Thread.Sleep(10)
    If Me.Opacity = 0 then
    Me.close()
    End If
  Loop
i think i got it, hope thats right. Thanks!
Yes, that's right, as you could have tested it...
Quick Update
v1.0.5

What's new?
  1. Fade speed can be optimized
  2. Walk speed can be optimized
  3. Show form on screen center (only FadeIn_FadeOut supported)
  4. Raises event when PopUp window is closed

Code http://pastebin.com/XLJuHfkj
It freezes my form when its doing the animation of the Form and once it's done my Main form works again. lol :P Could you just run this in a background worker? I'm not at home right now so I can't try it.
(Dec 6, 2013 04:45 PM)TazzyOpz Wrote:  It freezes my form when its doing the animation of the Form and once it's done my Main form works again. lol :P Could you just run this in a background worker? I'm not at home right now so I can't try it.

I don't know how did you use this, but you can do this easily with a timer. You will probably know how to do this, but if you don't I'll help you.
"Never be a spectator of unfairness or stupidity. Seek out argument and disputation for their own sake; the grave will supply plenty of time for silence." - C.H.
(Dec 6, 2013 05:16 PM)Nervo Wrote:  I don't know how did you use this, but you can do this easily with a timer. You will probably know how to do this, but if you don't I'll help you.

I PM'd you with a .Gif of the problem 🤝
(Dec 7, 2013 12:16 AM)TazzyOpz Wrote:  I PM'd you with a .Gif of the problem 🤝

Off topic: Do you make .gif with photoshop? If yes, i need to get a non-portable version, mine sucks...


Possibly Related Threads...
Thread / Author Replies Views Last Post
[Java] by +HazeJun 9, 2017 12:47 AM 61 8,270 Jun 9, 2017 12:47 AM
Last Post: +Haze
[C#] by uint32Jan 2, 2017 06:37 PM 12 869 Jan 2, 2017 06:37 PM
Last Post: BoliBerrys
[C#] by Ðr1psNov 9, 2015 03:56 PM 19 414 Nov 9, 2015 03:56 PM
Last Post: Ðr1ps