Writing an app for creating diagrams

I am investigating the possibility of writing an application to aid the creation of diagrams such as flowcharts or UML diagrams. How feasible is this using Visual Basic or Visual C++? I would like to be able to create a toolbox of objects that the user can then select and place on the screen, resize, connect etc

Is this simply a case of using the GDI graphic primitives and manipulating them on screen? How do applications like PowerPoint work?

Any info or pointers to resources would be gratefully received?

Who is Participating?
Dear jsturnbull1,

I think VB is not suitable, but you can solve the task under VB with (example):
a) The shape component
b) The line component

 With the shape component you can draw and generate the boxes of the diagrams and with
the line component you can connect them together. The handling of this components is similar to
windows. Therefore you can move,resize and they have a visibility order.
The shape component can be:
o square
o oval
o circle
o rounded square

Through Inheritence you can build also other components that better fit to you diagram forms ...

An another way is to use the programming language TCL/TK. (www.tcltk.com) ...
This is the easier way, when you an novice in VB or C++.
TCL is the script programming language and TK the graphical Tookkit.
With TK you can draw and manage simple graphical primitives like oval, circles, arrows and so on.
This is very easy. The application will be build as an script (like VBA in Excel) in TCL (Tool Command Language).
Example (Ein Fenster mit einem OK-Button):
toplevel .mainwindow
button .mainwindow.buttonok
pack  .mainwindow.buttonok
Thats was it. ... More code is not necessary!
In TCL/TK you have the advantage, that the code is running under windows and unix.

C++ is the hard way to work this out ...


it could be done in vc.  Most graphical apps are done in c.  you would have a harder time in vb, but i guess it could be done.  It depends on what you know.  If you are an expert vb person you might be able to do this now. if you know c well do it in that. If you don't know c you will have a lot of overhead learning it.  Depending on how you want to scale the app will affect it also.  If it is going to be a huge program like visio you will want to do it with c.  vb will break down once you have hundreds of objects on the screen.
jsturnbull1Author Commented:
Thanks for your replies. However, since my post someone has recommended to me to develop the application in Java. I've no experience of Java (but do know C++) but having looked briefly at its graphical capabilities I feel more confident going down this route rather VB/VC++. Plus I've also the option of looking into VJ++ so my skills in MS Visual languages may not be completely wasted. Plus, like W.Konig's suggestion of TCL/TK, a development in Java will be platform independent.

Thanks Jim
TCL/TK is also platform independent, although Java is also a good decision ...
But i don't know if Java has so great graphical abilities ....
TK thereagainst has the extension BLT which provides diagrams, tables, vectors and some more
The handling of this objects is like Java AWT ...
TCK/TK would keep a lot of developents time ... When Java has the same graphical features (not only window handling an so on) i will say nothing ...

Hope this helps
Wolfgang Koenig
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.