[.net] draw , drag-n-drop (C# .NET)

Started by
4 comments, last by jods 18 years, 9 months ago
Hi there, I am pretty new at C# .NET and I wonder if I can do something like this : * Draw a closed area (like in paint or any other drawing program) * Make this closed area identified as an object with components after it is drawed run-time (like its coordinates of borders etc. (also remember it may not be primitive shape like a rectangle or a circle, it may a complex drawing)) * Drag something a drop it "into" this area (drag-n-drop is ok bu I cannot check if it is inside the closed area or not) Thanks a lot...
Advertisement
The good news: yes, you can.
The bad news: you have to program it yourself.

I don't know any programminglanguage that allows you to do this by just calling a method...

What are you expecting?

Cheers
Sure I know that I have to write it myself ;P

But the problem is that I have said before : "I am pretty new at C# .NET and bla bla bla"...

So the exact thing I am asking for is if there is a way or a methodology or an algorithm or anything else that can help me to accomplish this task...

thanx again
What you want is to create a non-rectangular control. Explanation on how to do that here: Shaped Windows Forms and Controls in Visual Studio .NET

The basic idea behind it is Regions. Creating the region from an arbitrary bitmap is more complicated, but possible. See this article: Converting Color-Keyed Bitmaps to Custom Regions.

Hope it helps,
jods
It really helps...

U r great Jods
you are welcome :)

This topic is closed to new replies.

Advertisement