Results 1 to 3 of 3

Thread: Help with timers

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Mar 2002
    Posts
    68

    Help with timers

    I am trying to load a form from my sub main function but the timer never fires can you tell what am i doing wrong.

    Thanks


    [CODE]
    Public Class MainClass

    Friend Shared WithEvents t As New Timer()

    Public Shared Sub Main()

    Dim cl As New MainClass()

    t.Interval = 1
    t.Enabled = True

    cl.LoadSplash()

    End Sub

    Public Function LoadSplash()

    t.Start()

    End Function


    Private Shared Sub t_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles t.Tick
    MsgBox("Event")


    End Sub

    End Class


    [CODE]

  2. #2
    Your Ad Here! Edneeis's Avatar
    Join Date
    Feb 2000
    Location
    Moreno Valley, CA (SoCal)
    Posts
    7,339
    You don't have anything halting the executing of the Sub Main so it is reaching the end before the timer ever gets a chance to fire.

  3. #3
    Fanatic Member VBCrazyCoder's Avatar
    Join Date
    Apr 2003
    Posts
    681
    I think you might be able to use Application.Run(new YourFormHere).

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