From: avi on
Hello,

I'm looking for a way to draw or drop basic resizable shapes on a form
that could be retrieved once the form is closed and loaded again

Thanks
Avi
From: BTIS Jeff on
> I'm looking for a way to draw or drop basic resizable shapes
> on a form that could be retrieved once the form is closed
> and loaded again

Take a look at our MetaDraw component.
http://www.btis.com/btProducts/MetaDraw/MetaDraw.htm

MetaDraw will allow your users to draw shapes,
move the shapes, and resize the shapes.
You can also save and reload the layout
and continue to select, move and resize the shapes.

To use this, just put MetaDraw and a few buttons on your form.
In each button click you can set the EditMode for user to draw
desired type of shape, or you can set the EditMode to allow
select and resize. To save and reload the layout just
call the SavePicture and LoadPicture methods. To print
just set the ExportDC property.


The following is for use with MetaDraw 3 OCX edition
the code for .NET Winforms edition is basically the same but with
different assignments for the constants, and with use of .NET event
structure

' - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - -
Sub Form_Load()
' Initialize drawing area - make it same size as the
control
With MetaDraw1
.ScrollBars = BAR_NONE
.OrigHeight = .ClientHeight
.OrigWidth = .ClientWidth
.PicHeight = .ClientHeight
.PicWidth = .ClientWidth
.ZoomFactor = 1
.ScrollBars = BAR_AUTO
End With
End Sub
' - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - -
Sub cmdEllipse_Click()
MetaDraw1.EditMode = ED_ELLIPSE
End Sub
' - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - -
Sub CmdRectangle_Click()
MetaDraw1.EditMode = ED_RECT
End Sub
' - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - -
Sub cmdPolygon_Click()
MetaDraw1.EditMode = ED_POLYGON
End Sub
' - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - -
Sub cmdSelect_Click()
' in Select edit mode user can select, move, resize
shapes
MetaDraw1.EditMode = ED_cmdSelect
End Sub
' - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - -
Sub cmdSave_Click()
' save layout to reloadable format
FileName = "Somefile.mdp"
SaveFormat = PICTYPE_INTENAL
MetaDraw1.SavePicture FileName, PIc_Picture,
SaveFormat
End Sub
' - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - -
Sub cmdLoad_Click()
FileName = "Somefile.mdp"
MetaDraw1.LoadPicture FileName, PIc_Picture
End Sub
' - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - -
Sub cmdPrint_Click()
' Print the entire layout to user's choice of printer
MetaDraw1.Current = OBJ_CONT_MAIN
MetaDraw1.ExportDC = -2
End Sub
' - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - -

You can try this out in your web browser at
http://www.btis.com/btproducts/MetaDraw/WebSamples/Drawing/md3_demo.htm
You can also download MetaDraw to try in your own application
http://www.bennet-tec.com/downloads.htm
I hope this is helpful


* * Please include a copy of this message with any reply on this topic


Jeff Bennett
Jeff / At / Bennet-Tec / DOT / Com


* Bennet-Tec Information Systems, Inc
* 50 Jericho Tpk, Jericho, NY 11753
* WWW.Bennet-Tec.Com

RELIABLE Component Software
and Custom Software Development Services

* Expert Systems * Text Processing
* Databases * Interactive Web Sites
* Diagramming, Drawing, Hotspot Graphics
* Data Input & Data Presentation Systems
* Decision Support * Web Based Data Collection
* Forecasting * Signature Capture
* Desktop Windows, Tablets, Pocket PCs


TList™ / ALLText™ / MetaDraw™ / Web Signature™

======================== ========================

From: Mayayana on
That's a very general question. It's not the
sort of thing that people can just post a few
lines of code for. You might start by looking
at vbacccelerator.com. I think they have sample
programs that demostrate drawing techniques.

I did something like that once for a scripting
component that can draw on the Desktop and
optionally save the drawing. I don't know whether
it's quite what you want, but if it looks useful
I'd be happy to send you the relevant code from
that project:

http://www.jsware.net\jsware\jsdraw.php5

The component comes with sample VBScripts
that demonstrate how it works.

Another thought: You want people to be able
to create and resize shapes by dragging, etc.?
Then you want to reopen the program with the
shpaes from last session? Couldn't you do that
by just using VB Shape controls and keeping
a record of the resize operations?


|
| I'm looking for a way to draw or drop basic resizable shapes on a form
| that could be retrieved once the form is closed and loaded again
|
| Thanks
| Avi


From: Mike Williams on
"avi" <aviben(a)bezeqint.net.il> wrote in message
news:9ea9e00c-3c2e-4610-8207-77ffc96fb8ad(a)d37g2000yqm.googlegroups.com...

> Hello, I'm looking for a way to draw or drop basic resizable
> shapes on a form that could be retrieved once the form is
> closed and loaded again

Hi Jeff.

Mike