473,395 Members | 1,791 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,395 software developers and data experts.

timer event in vb 2005

Hi ,
I already created a button "enjoy button" that i want to move in a form when the "timer start button" is clicked.
how do link the timer to the
"timer start button" and make it move?

this is what i tried so far..then am blank
first

Expand|Select|Wrap|Line Numbers
  1.  
  2.     Private Sub MainForm_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
  3.     'Me.xTimer.Enabled = False
  4.     xTimer.Interval = 10
  5.  
  6.     DX = 1
  7.     xDXTextBox.Text = DX
  8.  
  9.     DY = 1
  10.     xDYTextBox.Text = DY
  11.  
  12.  
  13.     Counter = 1000
  14.     xCounterTextBox.Text = Counter
  15.  
  16.     X = 216
  17.     Y = 135
  18.  
  19.     Me.xButtonLabel.Text = "Button(" & X & ", " & Y & ")"
  20.  
  21.  
then

Expand|Select|Wrap|Line Numbers
  1.  
  2.     Private Sub TimeStartButton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles xTimeStartButton.Click
  3.  
  4.     Me.xTimer.Enabled = True
  5.  
Mar 15 '09 #1
3 1714
i got it ...but not i want to stop the timer and button when i click the timer start button..how do i do that?
Mar 15 '09 #2
debasisdas
8,127 Expert 4TB
the timer must be enabled only after clicking of the start button and should be disabled initially (form_load event)
Mar 16 '09 #3
thanks i solved it...
Mar 16 '09 #4

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

Similar topics

3
by: Gary | last post by:
Hi, How does one set up a timer so I can measure the time to do an event? Something like this I guess the format would be, start timer...
5
by: Richard P | last post by:
I need some help on timers. My app is asp.net 1.1 website running in a shared hosting environment with a third-party service provider. I currently request and cache 20 - 40 remote RSS feeds. When a...
6
by: Steve Jorgensen | last post by:
I know quite well that this question falls into the category of "why does Access misbehave when I do unexpected things to its objects?", but I thought I'd ask anyway, and see if anyone knows. ...
11
by: Steve Jorgensen | last post by:
I've recently been playing with some UI ideas that require the user of a timer to drive animation. The problem I'm having is that Access routinely stops firing timer events for long periods of...
9
by: Tolga Tanriverdi | last post by:
I wrote a program which includes a timer event in it but if my program executes on windows 98 the timer event is not running is something like that possible Thanks
9
by: HL | last post by:
I am using VS 2005 Beta - C# Problem: The Timer fires a few milliseconds before the actual Due-Time Let's say a timer is created in the following manner: System.Threading.Timer m_timer = null;...
1
by: pmclinn | last post by:
I have a form application with a timer event on it and a couple of proceedures that run great but when I converted the code to a .dll then I ran into some issues. The problem in my class is that...
2
by: Ben Fidge | last post by:
Using Visual Studio 2005, how would I go about creating an application-wide timer hosted in global.asax? There's certain processes I want to run every couple of minutes and have had success using...
10
by: janhm | last post by:
Hello. I have created a windows service that is supposed to turn the monitor on/off at specific times a day, but my timer dosn't seem to work. on my Service Start i set : timer1.Enabled =...
4
by: cmdolcet69 | last post by:
This code below write a serial command to the com port then read the results and disaplays it into the label1.text property when button1_click event is triggered. I think what is going on is that...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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
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...
0
Oralloy
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,...
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.