Rajneesh,
I tried the wrapper.vbp but I can't get it to work.
It keeps telling me that it is unable to load the graph.ocx.
Could you help me with an example on how to to this?
I have a form with a picture on which I load some lines and images.
Marco
Rajneesh Noonia schreef:
> Use API StretchBlt to Add Zoom Functionality.
> If your application deals with Graphics then it is better to use GDI+ which
> is much more powerfull , flexible and can add professional touch to your
> application.
> Zooming is used in one such example (Posted in VB6) using GDI+ see below
> mentioned link
>
http://www.planet-source-code.com/vb/scripts/ShowCode.asp?lngWId=1&txtCodeId=66543&txtForceRefresh=101120061275557879> "Co" wrote:
> > Hi All,
> >
> > I have an application in which I project images and lines on a VB form
> > through so called Ropes and Boxes:
> >
> > Boxes:
> > Public stdPic As StdPicture, X&, Y&, Text$, Text2$, Id$
> >
> > Public Sub Draw(Obj As Form) 'vbWhite
> > Call Obj.PaintPicture(stdPic, X - 90, Y - 90) 'Obj
> > Obj.CurrentX = X + 180 - (Len(Text) \ 2) * 100
> > Obj.CurrentY = Y + 470
> > Obj.Print Text;
> > Obj.CurrentX = X + 180 - (Len(Text2) \ 2) * 100
> > Obj.CurrentY = Y + 670
> > Obj.Print Text2;
> > End Sub
> >
> >
> > Ropes:
> > Public a As Box, b As Box, Text$, color&
> >
> > Public Sub Draw(Obj As Form)
> >
> > On Error Resume Next
> > Obj.Line (a.X, a.Y)-(b.X, b.Y), color
> > Obj.CurrentX = (a.X + b.X) \ 2 - (Len(Text) \ 2) * 100
> > Obj.CurrentY = a.Y + 0.5 * (b.Y - a.Y) - 100
> > Obj.Print Text;
> > End Sub
> >
> > The way they are projected is based on data from a database:
> >
> > For LoopPts = 1 To MyDataCount
> > With CircPts(LoopPts)
> > Font.Size = 24
> > Boxes.Add
> > NewBox(ImageList1.ListImages(MyData(LoopPts).pIcon).Picture, .X, .Y,
> > MyData(LoopPts).sLabel, MyData(LoopPts).sID, MyData(LoopPts).sLabel2)
> > Font.Size = 8
> > If MyData(LoopPts).pIcon = 1 Then 'Bios
> > Ropes.Add NewRope(Boxes(1), Boxes(LoopPts + 1),
> > MyData(LoopPts).sLink, vbBlack)
> > ElseIf MyData(LoopPts).pIcon = 2 Then 'Orgs
> > Ropes.Add NewRope(Boxes(1), Boxes(LoopPts + 1),
> > MyData(LoopPts).sLink, vbBlack)
> > ElseIf MyData(LoopPts).pIcon = 3 Then 'Events
> > Ropes.Add NewRope(Boxes(1), Boxes(LoopPts + 1),
> > MyData(LoopPts).sLink, vbBlack)
> > End If
> > End With
> > Next LoopPts
> >
> > At the moment I can choose between 16x16 and 32x32 images to be
> > displayed but I was
> > wondering if it is possible to have a zoom function like with Pictures.
> > All the graphics are displayed in a Picture so I think it should be
> > possible.
> >
> > MArco
> >
> >