[snippet]blinking text

Use this board to post your code snippets - tips and tricks
4 posts Page 1 of 1
Contributors
User avatar
Shim
VIP - Donator
VIP - Donator
Posts: 882
Joined: Wed Dec 14, 2011 5:02 am

[snippet]blinking text
Shim
hello guys :)

i am up with a small snippet its just a blinking text in vb.net

Image

you just need to add a timer and a label

double click timer and add this code
Code: Select all


 Me.Label1.Visible = Not Me.Label1.Visible


and now double click your form and add this code
Code: Select all
With Timer1
            .Interval = 500
            .Enabled = True
        End With
heres the full code
Code: Select all


Public Class Form1

    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        With Timer1
            .Interval = 500
            .Enabled = True
        End With
    End Sub

    Private Sub Timer1_Tick(ByVal sender As Object, ByVal e As System.EventArgs) Handles Timer1.Tick
        Me.Label1.Visible = Not Me.Label1.Visible
    End Sub
End Class

:)

enjoy wahooo;
Find my programs on Softpedia
User avatar
3aaBrSbeel
Top Poster
Top Poster
Posts: 139
Joined: Fri Jun 01, 2012 9:34 am

Re: [snippet]blinking text
3aaBrSbeel
Excuse me, Shim. But what's the "Not Me" ?
Is it part of the code that I type?
Code'n'Stuff Signature Of 3aaBrSbeel
®║▌│█│║▌║││█║▌║▌║▌
✔ Verified Official Code'n'Stuff account ᵀᴴᴱ ᴼᴿᴵᴳᴵᴻᴬᴸ
Image
User avatar
pip
VIP - Donator
VIP - Donator
Posts: 156
Joined: Tue Jul 12, 2011 3:13 am

Re: [snippet]blinking text
pip
Yes "not me" is like saying if visible then its not hence the blink it is needed in the code and as timer1 ticks then if it's visible it's not vice versa :) good share shim.
<a href="http://www.points2shop.com/s/xbox_point ... 5082"><img src="http://points2shop.com/images/promotion ... ricoxg.gif" border="0"/></a>
User avatar
Scottie1972
Codenstuff Elite
Codenstuff Elite
Posts: 953
Joined: Thu Jan 14, 2010 5:48 am

Re: [snippet]blinking text
Scottie1972
"Me" stand for the parent form1 that a control is on / bound to.
Image
4 posts Page 1 of 1
Return to “Quick Snips”