473,396 Members | 1,780 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Timer1 wont re-enable...vb.net

3
Ok heres the jist...

in the Timer1_Tick sub which is within the form1

i call
Expand|Select|Wrap|Line Numbers
  1. If something = true then
  2. Timer1.enabled=false
  3. ''Call a sub thats within a module to do something using the threadpool 
  4. ThreadPool.QueueUserWorkItem( New WaitCallback(AddressOf MySub)
  5. end if
  6.  
Now at the end of the sub {which is adding items to a DB i call it}
Expand|Select|Wrap|Line Numbers
  1. form1.timer1.enabled=true
  2. debug.print(form1.timer1.enabled) 'it gives me true
  3.  
Seems simple enough right? well it doesnt ever re-start..by that i mean the private sub timer1_tick never fires again.

Do you think the GC is collecting it since i disable it? The function can take a minute or so to run while its disabled.


Any ideas how to fix this issue?
Aug 30 '11 #1
1 1985
kadghar
1,295 Expert 1GB
mmm, i dont think the gc is collecting it, since its a control in the form. Why dont you try re-asigning it some interval after you re-enable it?
Sep 8 '11 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: KS | last post by:
In want to visualy drag a Button to a Label and when I depress the mousebutton on top of the label I want to show some dato from the Button in a MsgBox - that's my primary goal. I have made a...
11
by: Jay | last post by:
Hey Guys, I need an algorithm/formula to do the following: I have two 32-bit timers cascaded to form a 64-bit timer, max value per timer(50sec). This is the way they work: value | timer1 |...
5
by: Leon | last post by:
Is there a way I can create a thread at application level that running all the time along with application exists? I have tried to do the above thing, and I found for some reason, the thread only...
4
by: Jeff | last post by:
I have a program that watches folders for any modifications and then writees to the Event Log. Problem is , is that it writes it four (4) times. I will post the code below and hopefully somone can...
12
by: Jack Russell | last post by:
My unstanding of all VB up to and including vb6 is that an event could not "interrupt" itself. For instance if you had a timer event containing a msgbox then you would only get one message. ...
3
by: hazz | last post by:
Why do I get this error for this simple console app. It is complaining about the 'timer1_Elapsed' argument in System.Timers.ElapsedEventHandler(timer1_Elapsed); An object reference is required...
1
by: ollyculverhouse | last post by:
Hi, I have a custom menubar which lets users jump to useful forms in my database. For example if I first open a form called 'Add Individual' then another called 'Add Firm', if i try opening...
4
by: Bails | last post by:
Hi Im an absolute beginner in programming and am using VB.Net Express. To start my larning I decided to do a "Real World" app instead of "hello world" and am creating a Poker Countdown clock. ...
7
by: Andrew Wan | last post by:
I found this excellent High Speed Timer (in Pascal). I compiled it (using Turbo Pascal 7 and it runs fine): http://www.sorucevap.com/bilisimteknolojisi/programcilik/pascal/ders.asp?207995 and...
9
by: brendan_gallagher_2001 | last post by:
Hi I am seeing some strange behaviour on a windows (vb.net 1.1) service. Basically, what I see happening is that when the Timer1_Elapsed event fires, it attempts to execute Timer1.Stop() but...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
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...
0
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...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.