TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
John Simoes
NA
8
0
How to check position of picturebox
Apr 7 2008 12:29 PM
Hey guys, I'm developping a ball in cup game where the user has to guess under what cup the ball is located.
I've used the following code segment to animate the cups:
cupone.Location = new System.Drawing.Point(13, 120);
As you know, this statement draws the picturebox at the specified field. Now, I want to write an if statement that checks if the ball is at the proper location. For instance, this is where I put the ball:
ball.Location = new System.Drawing.Point(26, 156);
if (ball.Location = System.Drawing.Point (26, 156)) .. so on.. but I get an error that says:
Error 2 'System.Drawing.Region' is a 'type', which is not valid in the given context
How would I proceed to write an if statement check to see if a picturebox is in a certain location?
Thanks guys, much appreciated!
Reply
Answers (
1
)
C# License understandment, do i have to pay fees to microsoft?
method that receives the matrix values as a string