473,748 Members | 7,118 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

My Threading Timer Doesn't Tick

I can't get my threading timer to show a splash screen panel for six seconds, then move onto the next panel. The timer just doesn't tick (this is aparent when I set the time to wait to 100 and it never fires off the sub)

I've tried using java, I've tried using the system timer - this is my last hope - please help!

Here's my Code
-----------------

Private strConn As String = ConfigurationSe ttings.AppSetti ngs("conString" )

Private Sub btnAgree_Click( ByVal sender As System.Object, ByVal e As System.EventArg s) Handles btnAgree.Click
Dim oCallback As New TimerCallback(A ddressOf OnTick)
Dim lPeriod As Long = 6000
Try
oTimer = New System.Threadin g.Timer(oCallba ck, Nothing, 0, lPeriod)
Catch ex As Exception
Response.Write( "It Didn't Work")
End Try

pnl4.Enabled = True
pnl4.Visible = True
pnl9.Enabled = False
pnl9.Visible = False
Private Sub OnTick(ByVal state As Object)
pnl4.Visible = False
pnl9.Enabled = True
pnl9.Visible = True

End Sub

--------------------------------
From: Daniel Maycock

-----------------------
Posted by a user from .NET 247 (http://www.dotnet247.com/)

<Id>q9h/pdEvRUyMF53ytiQ L8Q==</Id>
Jul 21 '05 #1
0 1172

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
1774
by: Daniel Maycock via .NET 247 | last post by:
I can't get my threading timer to show a splash screen panel for six seconds, then move onto the next panel. The timer just doesn't tick (this is aparent when I set the time to wait to 100 and it never fires off the sub) I've tried using java, I've tried using the system timer - this is my last hope - please help! Here's my Code ----------------- Private strConn As String = ConfigurationSettings.AppSettings("conString") Private Sub...
7
2381
by: Noozer | last post by:
I have a timer on a form. It isn't firing at all. I know that the timer is enabled, and that the interval is low (4000, which should be 4 seconds). To ensure the timer wasn't being inadvertantly reset I put some extra code in the subs that enable and disable the timer. They fire as expected. To test this I added a second timer with a 1 second interval. The event for this time would output the enabled status of the first timer and its...
10
1658
by: Bob | last post by:
Okay, I've done this for years but now I'm going to question it just because this idea has been at the back of my head since I started using DotNet... My WinForms app queries a database every 60 seconds. I set up a singleton class that's instantiated when the app starts, and that starts a timer. My question is, would it be better to run this checking process on a separate thread and have it use its own DB connection? If there isn't a...
13
1945
by: Bob | last post by:
My WinForms app runs on the single default thread, and uses a single SqlConnection object for all queries. I need to use one or more timers to periodically execute some of them. My own testing indicates that the forms timer does not operate on its own thread and will not cause a query to be sent to use the single SqlConnection while another is being executed from the handling of other events. Is that right? I just want to be 100% sure...
2
2859
by: KSC | last post by:
Hello, I have used a thread timer as in the documentation on MSDN in my VB.NET application. Using System.Threading.Interlocked.Increment I increment the counter to a certain point, perform an operation, then dispose of the TimerReference. In this case, the operation is simply enabling a checkbox control. I have found that the timer will continue to tick at least twice after it is disposed. Sometimes it will tick several HUNDRED...
0
861
by: Daniel Maycock via .NET 247 | last post by:
I can't get my threading timer to show a splash screen panel for six seconds, then move onto the next panel. The timer just doesn't tick (this is aparent when I set the time to wait to 100 and it never fires off the sub) I've tried using java, I've tried using the system timer - this is my last hope - please help! Here's my Code ----------------- Private strConn As String = ConfigurationSettings.AppSettings("conString") Private Sub...
5
12245
by: Tony Gravagno | last post by:
I have a class that instantiates two Timer objects that fire at different intervals. My class can be instantiated within a Windows Form or from a Windows Service. Actions performed by one of the event handlers may take longer than the interval for either of the timers, so it's possible for multiple events to fire "simultaneously" and for events to queue up. I'm attempting to get the timers to sync on some reference type object, or use...
8
6860
by: KnighT | last post by:
I have a .net service that runs a System.Threading.Timer. The delegate points to the function that the service should execute when the timer elapses. Problem: The timer is not ticking. I have never used this timer. I used the documentation from Microsoft as a guide, but I cannot get this timer to work. Protected Overrides Sub OnStart(ByVal args() As String) Dim myTimer As New TimerState()
9
4706
by: MimiMi | last post by:
I want to perform certain tasks at certain intervals (update a GUI). But I also want to be able to update the GUI 'manually' (i.e a button click). How is this best achieved? I've tried to use a System.Threading.Timer and a TimerCallback, but the problem is that the 'Timer-Tick'-method (that actually performs the GUI update tasks) then executes on a ThreadPool thread, and it seems to exit after a while. I would like the same thread to be alive...
0
8823
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
1
9312
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9238
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
6793
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6073
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4593
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4864
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3300
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2206
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.