Sign in to follow this  

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

This topic is 4523 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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...

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites

This topic is 4523 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this