Solved

Writing an app for creating diagrams

Posted on 2001-06-20
5
149 Views
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?

Thanks
Jim
0
Comment
Question by:jsturnbull1
5 Comments
 
LVL 3

Expert Comment

by:jrspano
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.
0
 
LVL 4

Accepted Solution

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

MfG
W.Konig








0
 
LVL 9

Expert Comment

by:Valliappan AN
ID: 6217810
0
 

Author Comment

by:jsturnbull1
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
0
 
LVL 4

Expert Comment

by:WolfgangKoenig
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
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Enums (shorthand for ‘enumerations’) are not often used by programmers but they can be quite valuable when they are.  What are they? An Enum is just a type of variable like a string or an Integer, but in this case one that you create that contains…
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 Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
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…

705 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

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now