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

What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
VBS file using code from 2nd file (txt or vbs) 4 36
Access query that references subform 5 47
Access 2013 combo box not working 3 44
Help me. 3 55
I’ve seen a number of people looking for examples of how to access web services from VB6.  I’ve been using a test harness I built in VB6 (using many resources I found online) that I use for small projects to work out how to communicate with web serv…
Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…

777 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