Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions

Writing an app for creating diagrams

Posted on 2001-06-20
Last Modified: 2010-05-02
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?

Question by:jsturnbull1

Expert Comment

ID: 6210025
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.

Accepted Solution

WolfgangKoenig earned 75 total points
ID: 6210239
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 ...



Expert Comment

by:Valliappan AN
ID: 6217810

Author Comment

ID: 6217893
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

Expert Comment

ID: 6218179
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

Featured Post

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

When trying to find the cause of a problem in VBA or VB6 it's often valuable to know what procedures were executed prior to the error. You can use the Call Stack for that but it is often inadequate because it may show procedures you aren't intereste…
Background What I'm presenting in this article is the result of 2 conditions in my work area: We have a SQL Server production environment but no development or test environment; andWe have an MS Access front end using tables in SQL Server but we a…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

809 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question