Hello! I have a specific idea for the proram, but I don't really understand how to make it. What I need:
Standard Window with Canvas which is divided in a 10x10 boxed field. When you move your mouse over one of these boxes, it must become red (each box is white). When you move your mouse to another box, it becomes red, but the previous becomes white again.

I know how to make Canvas and I can divide it into 10x10 field. But I don't know how to make these boxes change color. It would be great if you could post a code here and I will try to understand it. This task is simple, but somehow I don't quite get it.

Recommended Answers

All 3 Replies

What code are you using?

Off hand I'd say look at the mouse enter event, and the IsMouseOver property.

Currently, none. I know about events. The main problem is that I can't understand properly how to differ these boxes on the field and how to manipulate them (recoloring them, at first). I try to understand it theoretically first, so that I will understand the mechanics of the code itself, not just copy it from somewhere.

Are you using WPF or WinForm?
You could implement 100 TextBox, Button etc. and implement the MouseHover event.
There is a video lesson somewhere about it I will try to find it for you.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.