I have a timer set to enable on a button click action. All of that works
fine, it displays on Label3 on Form1. Here is the thing though. Interval =
3000, which should be roughly 30 minutes (if my calculations are correct.)
The counter seems to be counting in seconds, which is fine, but for every
tick of the counter, 2-3 seconds pass on the system clock. Is there any way
to make the timer tick ACTUAL seconds? Or minutes better yet?
Code as follows so far:
Private Sub ToolStripButton2_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles ToolStripButton2.Click
If ToolStripButton2.Pressed Then Timer2.Enabled = True
End Su
--------------------------------------------------------------------------------
Private Sub Timer2_Tick(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Timer2.Tick
Static TimeSeconds As DateInterval = 3000
TimeSeconds = TimeSeconds - 1
Label3.Text = TimeSeconds
End Su
--------------------------------------------------------------------------------
Private Sub ToolStripButton4_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles ToolStripButton4.Click
If ToolStripButton4.Pressed = True Then Timer2.Stop()
End Sub
--
<XML>
<BEGIN:: DCSE-TRAINING>
<END:: DCSE-TRAINING>
<BEGIN:: GOOD-CAREER>
<BEGIN:: GOOD-CAREER>
<I SAID BEGIN:: GOOD-CAREER>
<BEGIN:: METHOD:: GIVE-UP>
</XML> 4 954
">I have a timer set to enable on a button click action. All of that works fine, it displays on Label3 on Form1. Here is the thing though. Interval = 3000, which should be roughly 30 minutes (if my calculations are correct.)
Milliseconds http://msdn.microsoft.com/library/de...ervalTopic.asp
I hope this helps,
Cor
Note that i have a system clock right next to the timer, so the seconds vs
timer ticks can be monitored very easily. I use the Label2.Text =
My.Computer.LocalTime.ToLongTimeString to computate the local time label.
--
<XML>
<BEGIN:: DCSE-TRAINING>
<END:: DCSE-TRAINING>
<BEGIN:: GOOD-CAREER>
<BEGIN:: GOOD-CAREER>
<I SAID BEGIN:: GOOD-CAREER>
<BEGIN:: METHOD:: GIVE-UP>
</XML>
"NeverwaY" wrote: I have a timer set to enable on a button click action. All of that works fine, it displays on Label3 on Form1. Here is the thing though. Interval = 3000, which should be roughly 30 minutes (if my calculations are correct.) The counter seems to be counting in seconds, which is fine, but for every tick of the counter, 2-3 seconds pass on the system clock. Is there any way to make the timer tick ACTUAL seconds? Or minutes better yet? Code as follows so far:
Private Sub ToolStripButton2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ToolStripButton2.Click If ToolStripButton2.Pressed Then Timer2.Enabled = True End Sub -------------------------------------------------------------------------------- Private Sub Timer2_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer2.Tick Static TimeSeconds As DateInterval = 3000 TimeSeconds = TimeSeconds - 1 Label3.Text = TimeSeconds End Sub -------------------------------------------------------------------------------- Private Sub ToolStripButton4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ToolStripButton4.Click If ToolStripButton4.Pressed = True Then Timer2.Stop() End Sub -- <XML> <BEGIN:: DCSE-TRAINING> <END:: DCSE-TRAINING> <BEGIN:: GOOD-CAREER> <BEGIN:: GOOD-CAREER> <I SAID BEGIN:: GOOD-CAREER> <BEGIN:: METHOD:: GIVE-UP> </XML>
Very informative... but i think that it's N00B proof. Will take me a little
time to dissassemble it and rewrite it for my application. Much appreciated.
--
<XML>
<BEGIN:: DCSE-TRAINING>
<END:: DCSE-TRAINING>
<BEGIN:: GOOD-CAREER>
<BEGIN:: GOOD-CAREER>
<I SAID BEGIN:: GOOD-CAREER>
<BEGIN:: METHOD:: GIVE-UP>
</XML>
"Cor Ligthert" wrote: ">I have a timer set to enable on a button click action. All of that works fine, it displays on Label3 on Form1. Here is the thing though. Interval = 3000, which should be roughly 30 minutes (if my calculations are correct.)
Milliseconds
http://msdn.microsoft.com/library/de...ervalTopic.asp
I hope this helps,
Cor
In other words - 3000 as the interval equals 3 seconds. 1,800,000 would be
30 minutes.
Locke
"Cor Ligthert" <no************@planet.nl> wrote in message
news:eT**************@TK2MSFTNGP15.phx.gbl... ">I have a timer set to enable on a button click action. All of that works fine, it displays on Label3 on Form1. Here is the thing though. Interval = 3000, which should be roughly 30 minutes (if my calculations are correct.)
Milliseconds
http://msdn.microsoft.com/library/de...ervalTopic.asp
I hope this helps,
Cor
This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Eric Trav |
last post by:
Hello,
I am using mozilla and javascript to change the style background color
for my select with onfocus() and back to white with onblur().
When i process onfocus(); i have to click on the...
|
by: David |
last post by:
Hi,
We have an internal network of 3 users.
Myself & one other currently have individual copies of the front-end
MS Access forms and via our individual ODBC links we have used the:
File > Get...
|
by: Jennyfer J Barco |
last post by:
In my application I have a datagrid. The code calls a Stored procedure and
brings like 200 records. I created a dataset and then a dataview to bind the
results of the query to my grid using ...
|
by: SStory |
last post by:
Ok, I have my helpfile made (chm).
I put help providers on everything and the name of the chm file in each.
(just the filename, no path)--help file will be in same folder as app.
I chose Topic...
|
by: Ken Varn |
last post by:
I have just started playing around with Web Services. I created a sample
Web Service and invoked a sample "Hello World" method call from my Win Forms
control running under an ASP.NET web page. ...
|
by: diffuser78 |
last post by:
I have just started to learn python. Some said that its slow. Can
somebody pin point the issue.
Thans
|
by: Marc |
last post by:
Hi,
Before I had installed Visual basic.net 2003 on my laptop toshiba Tecra S1
Tecra S1 Centrino 1.6GHz / XP Pro / 15.0 256mb
Windows XP servic pack2
After installing Visual Studio 2005...
|
by: Gernot Frisch |
last post by:
Hi,
my code is slow. I have to rethink of it. Can you help?
I'm displaying a logfile from a license server.
I have a vector (m_lines) of
struct LINE
{
STATUS status; // LOGIN or LOGOUT
|
by: mezise |
last post by:
Posted by Pratchaya:
------------------------------------------------------
MySQL Slow Log ERROR
In my.cnf
i add these lines
#######
log-bin
log-slow-queries = /var/log/mysqld-slow.log
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
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...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers,...
|
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...
|
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...
|
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...
|
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: 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...
| |