Hi! I have to write something like a multisim-like (http://www.ni.com/multisim/whatis.htm) software in VB.NET. My task is to make several custom controls, which the user can combine in order to create a circuit and test it after that. The problem is that I don't know how to make a control, looking smth like this (the green oscilloscope that says XSC1) -http://zone.ni.com/devzone/jsp/largeImage.jsp?imagename=/cms/images/devzone/epd/VoltageGenerator_Circuit.PNG&language=en and how to do the connection and transfer of data between two custom controls that the user wants to connect.
If you have any suggestion how to do that, pls tell me because I've been looking up the internet for like a week or smth and couldn't find anything...

To create a custom control you need to add a new user control into your project.
This user control can have a GUI that defines how is show in your form. You must add there textboxes, buttons, graphics, tabs or whatever you want in.

Then you will need to define interfaces, events, methods, functions and/or properties that will define how this control will interact with the rest of the world, or change his presentation or behaviour.

Once this is defined, you can use it in any form as any other predefined control.

Read here and here to know a little bit more over this.

Hope this helps

Thank you so much for your answer, but I already know how to make custom controls. The problem is I don't know how to make custom controls that can be combined into a testable circuit. What I mean is...how do I make the output of one control connect to the input of an exact second control and transfer data if there are 15 other controls in the circuit, for example.

Lets imagine that a user control has a property called connectors

This property can be a list of conector.

A conector is an object that has an ID, a property Connected with a value of true or false and, if true has a ConnectedTo object of type conector.

Once graphically via drag/drop you 'connect' from connector A of element1 to connector B of element2 you only need to add new conector object in the list of element1 with the id of the source conector, the connected value to true an the destination conector of the element2 selected by the drag/drop.

Once that, if a signal is to be output from the element1, you only will need to search in the list of connectors the connected ones, and send the 'signal' to the referenced element.

A good way to do that is suscribing the element2 input signal yo the output signal of the element1 via events and delegates.

Just a hint.

Edited 5 Years Ago by lolafuertes: n/a

This question has already been answered. Start a new discussion instead.