Results 1 to 3 of 3

Thread: temporary label

  1. #1

    Thread Starter
    Lively Member Amerigo's Avatar
    Join Date
    Dec 2008
    Location
    PSR B1620-26 c-1
    Posts
    126

    temporary label

    I am trying to get a label to show briefly (3 seconds) when the form loads. The following code gives the 3 seconds, but the label doesn't show. The label is set to visible in the Designer properties.

    Code:
            'hide label1 after 3 seconds
            Threading.Thread.Sleep(3000)
            Label1.Visible = False
    Adding 'Label1.Visible = True before the sleep function doesn't help.

    The full source code is here.
    Anyone who does not wonder, is either omnipotent or a fool.
    Amerigoware <<<My Projects

  2. #2
    King of sapila
    Join Date
    Oct 2006
    Location
    Greece
    Posts
    6,597

    Re: temporary label

    I don't know if the controls will be able to show in the form_load event.
    Also there is a specific control for situation when you want to show some initial pictures or text or anything in .net.
    I'm forgetting the name right now but i'm sure you will get the answer in a few minutes by someone.
    ἄνδρα μοι ἔννεπε, μοῦσα, πολύτροπον, ὃς μάλα πολλὰ
    πλάγχθη, ἐπεὶ Τροίης ἱερὸν πτολίεθρον ἔπερσεν·

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

    Re: temporary label

    The Load event handler is executed BEFORE the form is displayed. In the Load or Shown event handler, Start a Timer with an Interval of 3000. In the Timer's Tick event handler, Stop the Timer and Hide the Label.

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