Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7663613
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T14:05:42+00:00 2026-05-31T14:05:42+00:00

Background: I’m a web developer looking to expand my skill set a bit with

  • 0

Background: I’m a web developer looking to expand my skill set a bit with some tinkering on desktop application. This is just for fun.

I’m trying to build some minimal Visio like interface.

While in school I did a fair bit of .NET, so I am familiar with Winforms and GDI. I know I can draw on the screen pretty easily and write on it.

What I am looking for now is more of a way to let my user add “shapes” to a canvas. Think of how Visio does it with flowcharts forms, you pick the shape you want and you can drop it and adjust it (width, height, etc.).

I can manage to do this with a simple GDI shape like a rectangle, but am at lost as to what to look for when designing shapes of all sorts.

Again the closest example I can think of that does this would be Visio where you can pick a parallelogram for data-input drop it on a canvas and adjust as required.

What I’ve looked for into so far with minimal success includes:

  • Custom shapes;
  • Custom controls;
  • Enabling the form designer at runtime;
  • Vector based shape.

Any pointers as to what I should be looking for?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-31T14:05:44+00:00Added an answer on May 31, 2026 at 2:05 pm

    The best way to approach it would be to have user controls. Create a basic user control called Shape. Then for each shape you want, for example a Line Shape, create a class called LineShape that derives from Shape. In addition you’ll probably also want to create an Interface called IShape. Have each of your shape classes implement this interface. Interfaces should contain methods that all shapes will need. For example, you’ll want to put a method in the interface called EndPoints() which define endpoints the user can drag to resize the shape. Since each shape will be derived from a basic user control, they will already have drag and drop capabilities.

    In each shape, you’ll want to draw the shape in the paint method. In the paint method, you can get a handle to the Graphics object and do primitive things such as drawing lines, circles or polygons.

    Your “canvas” should also be a user control. You’ll want to define a List<IShape> list to hold each shape control that is dragged and dropped onto the canvas.

    For your dragging and dropping, you just need to enable this on the Shape control and it will inherit that from all the other shapes. While dragging onto the canvas, you’ll want to make sure the data being dragged is of type IShape and if it is, you’ll make a call to DoDragDrop() which will allow the user to drop shapes onto the canvas.

    If you need help, read up on Interfaces and User Controls.

    Always remember to try to program to an interface and if you do it well enough, you could even make your program support plug-ins so that other developers could write custom shapes that seemingly integrate with your application.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Background: Some time ago, I built a system for recording and categorizing application crashes
Background: I have some existing apps in the App Store and I have just
Background Developing a simple web application (Eclipse + JBoss + Apache Tomcat) to generate
Background: I've inherited a web application that is intended to create on-the-fly connections between
Background: This is really a general best-practices question, but some background about the specific
Background: I'm in the process of creating a web service using ASP.NET 2.0. This
Background info: We are currently 3 web programmers (good, real-life friends, no distrust issues).
Background I have a ror application which is continuously recording and showing on a
Background: I'm testing a function within an ASP.NET 4.0 (Web Forms not MVC) and
Background: I have a Visual Studio solution consisting of a website + REST web-service

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.