How 2 drag and drop 'items' onto a screen as in visio
-
HI guys I'm working on a simple program. Its supposed to be a network simulator to simulate simple routing algorithms and it consists of a small network design module where the user can actually draw a network with nodes and connectors on the screen. I'm kinda stuck at the drawing part like I want to make a simple drawing environment like Microsoft visio, where you drag items like nodes and routers from a toolbox onto a main screen and connect them with lines that signify connections. The thing is that I've not done much in VB and I'd like some pointers on how could this be done i.e. just the drawing environment. I'm using vb6 and could really use the help.
-
HI guys I'm working on a simple program. Its supposed to be a network simulator to simulate simple routing algorithms and it consists of a small network design module where the user can actually draw a network with nodes and connectors on the screen. I'm kinda stuck at the drawing part like I want to make a simple drawing environment like Microsoft visio, where you drag items like nodes and routers from a toolbox onto a main screen and connect them with lines that signify connections. The thing is that I've not done much in VB and I'd like some pointers on how could this be done i.e. just the drawing environment. I'm using vb6 and could really use the help.
If you don't have much experience in VB, your going to have a very difficult time doing this. Your drawing environment is going to have to support Drag and Drop (medium difficulty), and your going to have to be able to walk an object hierarchy that you create by dragging and droping controls that represent network objects and links. This object heirarchy will be populated and connected by objects (controls) that you have to write that conform to a certain Interface, that you must also design. This Interface is a MUST because this is what your hierarchy is going to be built with. Each object will have "must have" properties in it that will supply the data to connect one object to the next. This is definately NOT a beginner level project. I hope your well versed in Interfaces, Object Classes, and design patterns, because you going to rely on it HEAVILY in the this project. only about 10% of the code your going to write will be for handling painting. The other 90% will be for the object classes themselves, the code to simulate each object, managing the creation and destruction of those objects, managing the heirarchy tree, ... RageInTheMachine9532 "...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
-
If you don't have much experience in VB, your going to have a very difficult time doing this. Your drawing environment is going to have to support Drag and Drop (medium difficulty), and your going to have to be able to walk an object hierarchy that you create by dragging and droping controls that represent network objects and links. This object heirarchy will be populated and connected by objects (controls) that you have to write that conform to a certain Interface, that you must also design. This Interface is a MUST because this is what your hierarchy is going to be built with. Each object will have "must have" properties in it that will supply the data to connect one object to the next. This is definately NOT a beginner level project. I hope your well versed in Interfaces, Object Classes, and design patterns, because you going to rely on it HEAVILY in the this project. only about 10% of the code your going to write will be for handling painting. The other 90% will be for the object classes themselves, the code to simulate each object, managing the creation and destruction of those objects, managing the heirarchy tree, ... RageInTheMachine9532 "...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
I'm not like totally raw in VB6 I've made & used simple classes and activeX controls.. I'm just a bit rusty in VB6 thats all :). My object oriented concepts are pretty good I should say cos I'm pretty fine in VC++6. The only thing is that the restriction on this project is that its hould be in VB6. I would like to know on how to start and where to begin.
-
I'm not like totally raw in VB6 I've made & used simple classes and activeX controls.. I'm just a bit rusty in VB6 thats all :). My object oriented concepts are pretty good I should say cos I'm pretty fine in VC++6. The only thing is that the restriction on this project is that its hould be in VB6. I would like to know on how to start and where to begin.
gamerPotatoe wrote: I would like to know on how to start and where to begin. Start by designing your object model. You don't need VB to do that. You need to design an Interface for your objects that will allow you to walk your object tree. It will also need to support your design for your network simulation. You probably be make strong use of the factory design pattern. to create your objects as you need them. RageInTheMachine9532 "...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome