Common Interface for objects that expose VB-drawing-API
- From: Alexander Mueller <millerax@xxxxxxxxxxx>
- Date: Tue, 23 May 2006 12:17:36 +0200
Hi
VB.Form, VB.PictureBox and VB.Printer have a TextWidth and TextHeight-method, they also share these VB-Drawing methods
like PaintPicture, PSet, Line, Circle, Print, Cls
and props like CurrentX, CurrentY, DrawMode, DrawWidth, FillColor
and some more.
Is there a name for a common COM-interface that these VB-objects implement, so that if i can specify this interface-type for an
argument of a method, rather then the generic 'Object'-type?
I am replacing controls that have multiple cols displaying
text-entries like listviews, grids, option-groups etc by text
printed onto either pictureboxes, forms or the printer-object
and i need to get max text-width and -height of the list-control.
So it was nice, although not necessary, if i could pass the control
that executes TextWidth and TextHeight by a strong type.
My current signature is:
Public Sub GetMaxTextEntend _
( _
oCtrl As Object, _
oNewContainer As Object, _
ByRef sngMaxTextWidth As Single, _
ByRef sngMaxTextHeight As Single _
)
where
oNewContainer As Object,
should by replaced by
oNewContainer As IVBContainerForDrawing,
Now does this interface exist and does it have a name?
MfG,
Alex
.
- Follow-Ups:
- Re: Common Interface for objects that expose VB-drawing-API
- From: Mike D Sutton
- Re: Common Interface for objects that expose VB-drawing-API
- Prev by Date: Re: Update a graphic and save it
- Next by Date: Re: Update a graphic and save it
- Previous by thread: Re: display properties again
- Next by thread: Re: Common Interface for objects that expose VB-drawing-API
- Index(es):
Loading