Results 1 to 5 of 5

Thread: VB 2010 Label Question

  1. #1

    Thread Starter
    New Member
    Join Date
    May 2012
    Posts
    7

    VB 2010 Label Question

    Hello.

    I was wondering if anyone knew how to make a label update and add another letter beside it?

    E.X : I want it to say Loading then 1 seconds later it goes to loading. then to loading.. then loading...

    So

    Loading
    Loading.
    Loading..
    Loading...

    Basically how do I animate the "." to be able to add one beside the "loading" every 1 second.

    Please help me a.s.a.p

  2. #2
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    110,274

    Re: VB 2010 Label Question

    A Label does one thing: it displays the contents of its Text property. That's it, that's all. If you want something in your app to change regularly then you would use a Timer, set its Interval appropriately and then handle its Tick event. In the event handler you make the appropriate change. In this case, the appropriate change would be to set the Text property of your Label.

  3. #3

    Thread Starter
    New Member
    Join Date
    May 2012
    Posts
    7

    Re: VB 2010 Label Question

    Still need help, perhaps a tutorial?

  4. #4
    Angel of Code Niya's Avatar
    Join Date
    Nov 2011
    Posts
    8,598

    Re: VB 2010 Label Question

    His explanation is way too simple to need a tutorial. What is it that you don't understand ?
    Treeview with NodeAdded/NodesRemoved events | BlinkLabel control | Calculate Permutations | Object Enums | ComboBox with centered items | .Net Internals article(not mine) | Wizard Control | Understanding Multi-Threading | Simple file compression | Demon Arena

    Copy/move files using Windows Shell | I'm not wanted

    C++ programmers will dismiss you as a cretinous simpleton for your inability to keep track of pointers chained 6 levels deep and Java programmers will pillory you for buying into the evils of Microsoft. Meanwhile C# programmers will get paid just a little bit more than you for writing exactly the same code and VB6 programmers will continue to whitter on about "footprints". - FunkyDexter

    There's just no reason to use garbage like InputBox. - jmcilhinney

    The threads I start are Niya and Olaf free zones. No arguing about the benefits of VB6 over .NET here please. Happiness must reign. - yereverluvinuncleber

  5. #5
    Fanatic Member proneal's Avatar
    Join Date
    May 2011
    Posts
    762

    Re: VB 2010 Label Question

    Quote Originally Posted by jmcilhinney View Post
    A Label does one thing: it displays the contents of its Text property. That's it, that's all. If you want something in your app to change regularly then you would use a Timer, set its Interval appropriately and then handle its Tick event. In the event handler you make the appropriate change. In this case, the appropriate change would be to set the Text property of your Label.
    This is basically true although I have been known to use a blank label as a sort of placeholder for another Control that would be loaded from the program running. The Label is invisible when used this way and does not take any egregious amount of memory. Every now and then the Label can and quite often will do double duty, since i can then just grab it and place it where I really need it during program running, and display the Text it is meant as designed for -solely, like you have stated here John

    I'm not attacking your quote at all, merely glad to be able to share some ideas amongst the group and groupies

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width