Click here to Skip to main content
16,005,162 members
Home / Discussions / C#
   

C#

 
GeneralRe: need help in modifying some parts of he Cosmos code Pin
Eddy Vluggen11-Apr-09 1:03
professionalEddy Vluggen11-Apr-09 1:03 
GeneralRe: need help in modifying some parts of he Cosmos code Pin
0x3c011-Apr-09 1:13
0x3c011-Apr-09 1:13 
QuestionHow to change cursor to hand on a specific area of a form or control? Pin
Supra210-Apr-09 22:33
Supra210-Apr-09 22:33 
AnswerRe: How to change cursor to hand on a specific area of a form or control? Pin
Sami Jadoon10-Apr-09 23:20
Sami Jadoon10-Apr-09 23:20 
AnswerRe: How to change cursor to hand on a specific area of a form or control? Pin
Sami Jadoon10-Apr-09 23:22
Sami Jadoon10-Apr-09 23:22 
AnswerRe: How to change cursor to hand on a specific area of a form or control? Pin
Henry Minute11-Apr-09 0:34
Henry Minute11-Apr-09 0:34 
GeneralRe: How to change cursor to hand on a specific area of a form or control? Pin
Supra211-Apr-09 1:47
Supra211-Apr-09 1:47 
GeneralRe: How to change cursor to hand on a specific area of a form or control? Pin
Henry Minute11-Apr-09 2:29
Henry Minute11-Apr-09 2:29 
If you are drawing the card image, then you know where it is on your form. You know its location and you know its size, therefore you can construct a rectangle from that information.

What you need to do is to keep a record of the rectangles for all the cards on your form. I'll leave you to research on how to do that.

Then when the mouse cursor moves you will have to go through all those rectangles to see if they hold the mouse position within their boundaries.
Look at the MSDN documentation for Rectangle to find a suitable method for that.

Your form is a control, therefore it has a Cursor property, you already know about that, so need no help on it.

Look away now! RANT coming up!
In the first post in this thread you stated that you had asked before but were not getting answers. In your previous post you were asking about detecting when the mouse was over an image. Rewording the question does not make an entirely different post! Stick to the rules. Remember that there are time differences, you are getting responses from all round the world. While you are working, others are asleep. If your problem is so damned urgent then get your credit card out and visit rent-a-coder, otherwise learn patience. I, and others, had responded to your first post, this thread should have been a continuation of that first post. Learn the rules of the forums, and keep to them, otherwise people will just ignore you.

Rant over.

For what it's worth I think that you are going about this in the wrong way. Ask yourself these questions, "What happens when the user clicks on one of the 'cards'? How do you as the programmer know what 'card' it is? Is it a Heart or Spade, is it a ten or an Ace?"

However you should at least complete the part you are doing, before changing your design, because you will learn many useful techniques. Also bear in mind that what you are doing is essentially a 'drawing' program. it's just that you are drawing cards whilst they draw circles, squares etc. So before you ask any more questions about this, Google for 'sketch program c#' or 'drawing program c#' and anything else like that that springs to mind, take a look at that code, it should give you many ideas on how to do your application.

Good luck!

Henry Minute

Do not read medical books! You could die of a misprint. - Mark Twain
Girl: (staring) "Why do you need an icy cucumber?"
“I want to report a fraud. The government is lying to us all.”

GeneralRe: How to change cursor to hand on a specific area of a form or control? Pin
Supra211-Apr-09 5:37
Supra211-Apr-09 5:37 
Questiongetting a list of all classes from a referenced dll. Pin
NetQuestions10-Apr-09 22:11
NetQuestions10-Apr-09 22:11 
AnswerRe: getting a list of all classes from a referenced dll. Pin
Eddy Vluggen10-Apr-09 23:31
professionalEddy Vluggen10-Apr-09 23:31 
GeneralRe: getting a list of all classes from a referenced dll. Pin
NetQuestions11-May-09 5:24
NetQuestions11-May-09 5:24 
Questionexcel.to web form Pin
kapilsahrawat10-Apr-09 21:19
kapilsahrawat10-Apr-09 21:19 
QuestionRetrieve Image from database using textbox Pin
ciqing10-Apr-09 20:29
ciqing10-Apr-09 20:29 
AnswerRe: Retrieve Image from database using textbox Pin
Anubhava Dimri10-Apr-09 21:17
Anubhava Dimri10-Apr-09 21:17 
GeneralRe: Retrieve Image from database using textbox Pin
ciqing11-Apr-09 6:33
ciqing11-Apr-09 6:33 
GeneralRe: Retrieve Image from database using textbox Pin
Anubhava Dimri12-Apr-09 18:14
Anubhava Dimri12-Apr-09 18:14 
QuestionEmbedded resource Pin
Karmendra Suthar10-Apr-09 20:19
Karmendra Suthar10-Apr-09 20:19 
QuestionUsing an image as a link.......How to? Pin
Rajdeep.NET is BACK10-Apr-09 19:44
Rajdeep.NET is BACK10-Apr-09 19:44 
AnswerRe: Using an image as a link.......How to? Pin
MNantu10-Apr-09 22:17
MNantu10-Apr-09 22:17 
QuestionClosing the curent process Pin
mrithula810-Apr-09 19:24
mrithula810-Apr-09 19:24 
AnswerRe: Closing the curent process Pin
Anubhava Dimri10-Apr-09 20:52
Anubhava Dimri10-Apr-09 20:52 
AnswerRe: Closing the curent process Pin
Luc 64801111-Apr-09 0:31
Luc 64801111-Apr-09 0:31 
QuestionHow to create Control array? Pin
12Code10-Apr-09 19:21
12Code10-Apr-09 19:21 
AnswerRe: How to create Control array? Pin
a.hamidy10-Apr-09 20:06
a.hamidy10-Apr-09 20:06 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.