Home All Groups Group Topic Archive Search About
Author
18 Oct 2005 1:23 PM
mark blackall
Hi all,

I want to create a VB program that allows a user to design a page layout. I
have no idea what approach to take with a program like this, in particular,
I would like a user to be able to take a field and move it around the
screen, graphically, then drop it somewhere. I would also be able to move
'lines' about on the screen.. While I have used VB a great deal, I don't
know what sort of technology there is on VB to do this sort of 'graphical
manipulation' so any help gratefully received.

I thought of using the shape and line controls, but they don't seem to have
any events etc associated with them.

Cheers

Mark

Author
18 Oct 2005 1:44 PM
Joseph Ferris
Mark,

Depending on how far you go with it (as in complexity/features/etc.),
this project can be quite challenging.  At a previous employer, I
created a WYSIWYG XHTML editor in VB6.  I don't have any access to any
of the code anymore, so I can't give specific exmamples.

For objects on the page, I create an ActiveX control that had resize
handles when activated.  I used this as the base container for anything
that needed to be placed on the page, such as images, shapes, etc.
What the control did was it exposed a "ChildControl" property that I
would use to stick another control in.  Textboxes, labels, other custom
ActiveX controls, etc.

In your case, you can make a "heavyweight" line object as an ActiveX
control and it could then raise whatever events you wanted it to.  The
problem is that this approach doesn't account for diagonal lines - I
never found a solution, because they weren't part of my requirements.

Here are a couple the link to the project that I used as a base for
what I did:
http://www.mvps.org/vbvision/Sample_Projects.htm

Good luck!

Joseph
Author
18 Oct 2005 1:49 PM
Mike Williams
"mark blackall" <black***@btinternet.com> wrote in message
news:dj2t2n$dbb$1$8300dec7@news.demon.co.uk...

> Hi all, I want to create a VB program that allows a user to design a page
> layout. I have no idea what approach to take with a program like this, in
> particular, I would like a user to be able to take a field and move it
> around
> the  screen, graphically, then drop it somewhere. I would also be able to
> move 'lines' about on the screen.

This kind of thin g can easily be done in VB, but it would take you quite a
bit of time to write the code in a way that takes all possibilities into
account. The idea was discussed in some detail in this newsgroup about a
month ago. Go to Google and click "groups" and search for the thread
"trapping mouse movements in picture box" and it'll take you straight to it.

Mike
Author
18 Oct 2005 2:41 PM
Kasia Muniak
Show quote Hide quote
U¿ytkownik "mark blackall" <black***@btinternet.com> napisa³ w
wiadomo¶ci news:dj2t2n$dbb$1$8300dec7@news.demon.co.uk...
> Hi all,
>
> I want to create a VB program that allows a user to design a page
layout. I
> have no idea what approach to take with a program like this, in
particular,
> I would like a user to be able to take a field and move it around
the
> screen, graphically, then drop it somewhere. I would also be able to
move
> 'lines' about on the screen.. While I have used VB a great deal, I
don't
> know what sort of technology there is on VB to do this sort of
'graphical
> manipulation' so any help gratefully received.
>
> I thought of using the shape and line controls, but they don't seem
to have
> any events etc associated with them.
>

Take a look at:
http://www.codearchive.com/code/0200/0201-formdsgn.zip

Kasia Muniak