Is there a way to make a constructor for an activex object?
For example i want to make an activex control that will be basically a simple usercontrol and it will take different shapes with the setwindowrgn api.
Now i want to do something like this from my form
now when the ShapeUserControl is appearing on the form i want to do something like this:VB Code:
dim CIRCLE_VALUES as new Collection CIRCLE_VALUES.add 0 'x1 CIRCLE_VALUES.add 0 'y1 CIRCLE_VALUES.add 10 'x2 CIRCLE_VALUES.add 10 'y2 dim newctl=new ShapeUserControl("Circle",CIRCLE_VALUES)
VB Code:
if Shape_Type="Circle" then hRgn=CreateEllipticRgn CIRCLE_VALUES.item(1),CIRCLE_VALUES.item(2) ......... SetWindowRgn me.hwnd,hrgn,true elseif Shape_Type="Polygon" then hRgn=CreatePolygonRgn ..... SetWindowRgn me.hwnd,hrgn,true




Reply With Quote