By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,579 Members | 1,618 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,579 IT Pros & Developers. It's quick & easy.

stopping timers with edges?

P: n/a
Hi, i have a game im programming where a i need a timer to be disabled if a
buttons top edge hits the bottom edge of a label but nothing i try seems to
work. Also i need it to stop the timer if it hits a labels left and top edges
but nothing works......help!
Nov 21 '05 #1
Share this Question
Share on Google+
4 Replies


P: n/a
Hi,

Post some code

Ken
----------------------
"iwdu15" <iw****@discussions.microsoft.com> wrote in message
news:AF**********************************@microsof t.com...
Hi, i have a game im programming where a i need a timer to be disabled if a
buttons top edge hits the bottom edge of a label but nothing i try seems to
work. Also i need it to stop the timer if it hits a labels left and top
edges
but nothing works......help!
Nov 21 '05 #2

P: n/a
If Me.btnplayer.Top = Me.Label5.Bottom Then
Me.Timer1.Enabled = False
End If

or
If me.btnplayer.location.equals(me.label5.location) then
me.timer1.enabled=false
end if

or

If me.btnplayer.location.y = me.label5.location.y + me.label5.height then
me.timer1.enabled=false
end if
Nov 21 '05 #3

P: n/a
Hi,

Use Rectangle.intersectswith to see if they overlap.

http://msdn.microsoft.com/library/de...classtopic.asp

if label5.clientrectangle.intersectswith(btnplay.clie ntrectangle) then
Me.Timer1.Enabled = False
End If
Ken
------------------------
"iwdu15" <iw****@discussions.microsoft.com> wrote in message
news:1F**********************************@microsof t.com...
If Me.btnplayer.Top = Me.Label5.Bottom Then
Me.Timer1.Enabled = False
End If

or
If me.btnplayer.location.equals(me.label5.location) then
me.timer1.enabled=false
end if

or

If me.btnplayer.location.y = me.label5.location.y + me.label5.height then
me.timer1.enabled=false
end if
Nov 21 '05 #4

P: n/a
I tried that and the timer starts within a second of starting. i debugged and
it found the two intersecting when they arent
Nov 21 '05 #5

This discussion thread is closed

Replies have been disabled for this discussion.