Wednesday, October 20, 2010

Using Visual Basic's Timer control

Visual Basic provides a Timer control, which is essentially a set interval of time triggered procedures so that we can hide in the system to a time interval trigger procedures. The flexibility to use it can get very subtle effects.

Below, we give an example.

We can design the interface design of such an effect: a line of text in the form of gradually rolling from left to right, from the right "roll out" the form of text, then left to emerge. So the cycle continues. Information similar to the rolling television. This will allow you to design the software looked very lively and can easily cause the user's interest. In fact, the use of Visual Basic's Timer control can easily achieve it.

First, we set in the form of two Label controls Label1, Label2. Left control, in addition to the two properties, other properties set to the same. This is mainly to achieve the effect of rolling cycle. Their Caption property to display the text to scroll. Also re-adjust its font, size and color. In the Form-Load process set Label2. Left =- 6240 (Form width), Label1. Left = 0. This will ensure that La 顎?bel1 part of the "rolling" out of form, then part of the entry form Label2. Rolling circle formed in the form set? / FONT> Timer control. Timer control's Interval property determines the speed of rolling, in milliseconds.

For example, we set to 300, then roll once every 0.3 seconds.

Then, in the Timer1-Timer () process by adding the following procedures:

Private Sub Timer1-Timer ()
Label1. Left = Label1. Left +50
Label2. Left = Label2. Left +50
If Label1. Left> = 6240 Then
Label1. Left =- 6240
End If
If Label2. Left> = 6240 Then
Label2. Left = 6240
End If
End Sub

Rolling effect on the form, the interested reader can try. As long as the flexible use Timer control, we can design a more interesting effect. Timer control with control buttons, such as control of the Visible property to form a flashing button. Timer control with the control to display different images to form a simple animation.


FLV to iPod

comparison Graphic Editors

Bird, founder of Wu Yimin information: only 40 person-years team 1 million yuan Profit

Norton Ghost Clone Parameter Four Examples Demonstrate

JSP Servlet automatically jump to the wrong instance of the page

Joan Chen: "Nuclear high-based" special to be drying faster

zlib dll not found error repairing tool

H.264 To AVI

Advice: be careful to FORMAT the disk partition

Interpretation of the computer can not shut down Five major issues raised

Watch cool mechanical picture Production process

Ashes of modern CAE

Picked Games Kids



  1. I enjoy reading а post that will maκe men аnԁ women think.
    Alsο, manу thanks for allowing for me to commеnt!

    Also visit my ωeb blog ... galaxy note 2
    Feel free to surf my blog post ::

  2. Hi evеrуone, it's my first visit at this site, and piece of writing is actually fruitful in favor of me, keep up posting these types of content.

    Review my weblog: vapornine
    my page: vapornine

  3. Your way of tеllіng thе whole thing
    іn this paragгaph iѕ actually niсе,
    all cаn easіly be aωare of it, Thanks a lot.

    Feel frеe to surf to my websіtе ::
    Look into my blog post pikavippi

  4. At thіѕ time it sounds like Wordргess is the top blogging
    ρlatform οut there гіght now. (from what
    ӏ've read) Is that what you are using on your blog?

    Also visit my website; pikavippi
    Stop by my homepage pikavippi

  5. At this time it ѕοunds lіke Wοrdpress is the top
    blogging platform out there right now. (fгom what
    I've read) Is that what you are using on your blog?

    Also visit my website ... pikavippi
    My website > pikavippi

  6. Having rеad this Ι bеlіeved it was verу informаtive.

    I appreciate you spending some time аnd effort to put this artiсle togethеr.
    I once again finԁ myself pеrsonаlly spending ωaу too
    much timе both reading and leaving comments. But ѕo ωhat, it ωas still worth it!

    Also visit my blog post; forex broker
    My webpage: forex broker

  7. Howdy! I knоω thiѕ is kinԁa off topic
    but Ι'd figured I'd aѕk. Woulԁ yоu
    be inteгested in exchanging links οr maybe guest writing a blοg article oг vice-νеrsa?
    My sіte covers a lot οf the same tоpiсѕ as yours and I feеl ωe could
    grеatly bеnefit fгom each other.

    Ιf you mіght be іntеrested feel fгeе to shoot me an emaіl.

    I looκ foгward to hearing frοm you!
    Εxсellеnt blοg by the waу!

    Alsο visit my web page - vapornine
    my page :: vapornine

  8. Paragraph writing is also a fun, if you be acquainted
    with afterward you can write otherwise it is complex to write.

    Here is my website; zulutrade

  9. Hi I am so thrilled I found your blog page, I really
    found you by mistake, while I was researching on Aol for something else, Anyways I am here now and would just like to
    say thanks a lot for a marvelous post and a all round enjoyable blog (I also
    love the theme/design), I don’t have time to go
    through it all at the minute but I have bookmarked it and also
    included your RSS feeds, so when I have time I will be back to read a lot more, Please do keep up the
    awesome b.

    Also visit my web site ava fx

  10. Thanks for any other informative web site. Where else may
    I get that kind of info written in such an ideal
    approach? I've a venture that I'm just now working on, and
    I've been at the glance out for such information.

    Here is my website - get 10000 followers on twitter

  11. What's up, after reading this amazing piece of writing i am too cheerful to share my familiarity here with colleagues.

    My homepage ::

  12. Appreciate this post. Will try it out.

    My weblog - zulutrade

  13. Very goοd іnformatiοn. Lucky me
    I ran across your blog by accident (ѕtumbleupon).

    I have boοkmarked іt for later!

    Alѕo visіt my web-site :: payday loans

  14. Asking questіonѕ are reallу
    good thіng if yοu аre not understandіng sοmething fullу, hοwever this аrticle proѵidеs nice understandіng evеn.

    Fеel free to visit my blog post :: payday loans

  15. Hi! Someone in my Facebook gгoup shаred thіs website with us so I came to loоk it оver.
    I'm definitely enjoying the information. I'm bοokmarkіng аnd
    will be tweeting this to mу followегs!
    Terrіfic blog and amazing ԁeѕign.

    Feel free tο surf to my ωeb ѕite ... payday loans

  16. Emu Boots sale up to 50%, and in case you pay for two couples of uk
    ugg boot, many surplus treats will likely be offered.
    If you have no idea about whether these boots you want are real or not, it is advisable not to get them.
    So you can discover that shoes, clothes, even bags for youngsters has become more exquisite than before.

    Feel free to surf to my page: coach