Schematic Capture Questions

TristanJ

New member
Joined
Jul 25, 2006
Messages
1
Programming Experience
Beginner
Hi,
I am currently writing a schematic capture app in VB.NET and I was wondering if anyone could give me some advice with regards to how to draw the circuit elements at runtime. The user needs to be able to click to select the elements as well as click and drag to move them. I can envision two approaches: one using user controls that are basically empty and using GDI+ to draw on them. Then I can use VB's mouse_down, mouse_move and mouse_up events to move the element around. This doesn't seem to "elegant" however. Alternatively I can build a set of classes that represent each object and then test for a hit when the user clicks on the form. Which is the better idea, in your opinion(s)?

Also, if my "class" for the second option has a "Render" function, is it more efficient/better to pass the form's graphic object by reference and have the component draw itself on the graphic object or to return a small graphic object from the render function that contains the image and then somehow insert that into the main drawing surface's graphics object?

Thanks and Regards,
Tristan Jones
 
Back
Top