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

.NET 

[TUT] Advanced Chat Popup

First create 2 Timers, 1 Label and a Button


Insert in First Timer(Timer1) :
Code
Dim location As New System.Drawing.Point(500, Me.Location.Y + 3)
        Me.Location = location
        Label1.Text = Label1.Text + 1
        If Label1.Text = "15" Then Timer1.Enabled = False


Insert in Second Timer(Timer2) :
Code
Dim location As New System.Drawing.Point(500, Me.Location.Y - 3)
        Me.Location = location
        Label1.Text = Label1.Text - 1
        If Label1.Text = "0" Then
            Timer2.Enabled = False
            End
        End If



----
First Timer(Timer1) :
Enabled = true
Interval = 30
----
Second Timer(Timer2) :
Enabled = false
Interval = 30
----
Button (Button1) :
QUELLTEXT
Timer2.Enabled = True

----
Label (Label1) :
Text : 0
----
Form(Form1) :
Location : 500; -42
Start Position : Manual
Opacity : 95%
Controlbox : False
Formborderstyle : None

-Goodluck
FR1908
Thank you for the tutorial m8! and thanks for sharing the code.
Nice


Short Ftw?


Still short.... FML
What, no explanation? I have to READ THE CODE!?!?! OMG!
lol, it's working..
but..
i can't do anything with this?
Nice, but a more practical way would be to do this:

Put this just under "Class FormName"
Code
Dim i as integer

Timer 1 snippet:
Code
Dim location As New System.Drawing.Point(500, Me.Location.Y + 3)
        Me.Location = location
      
        If i = "15" Then
        Timer1.Enabled = False
        Else
              i += 1
        End If

Timer 2 Snippet:
Code
Dim location As New System.Drawing.Point(500, Me.Location.Y - 3)
        Me.Location = location

        If i = "0" Then
            Timer2.Enabled = False
            End
        Else
            i -= 1
        End If

Should work, i can't test as i'm using linux atm.

Basically setting the variable in the background, without the use of a label, although adding a label makes sense if you wanted to display the counting. ;p


Possibly Related Threads...
Thread / Author Replies Views Last Post
[.NET] by anthoo12Feb 2, 2018 11:46 PM 16 2,057 Feb 2, 2018 11:46 PM
Last Post: v.e.n.o.m
[C] by zNinjaJan 26, 2018 04:03 AM 0 104 Jan 26, 2018 04:03 AM
Last Post: zNinja
[.NET] by XoggJan 14, 2017 10:58 PM 12 569 Jan 14, 2017 10:58 PM
Last Post: Palmtr33fever