Luckily I got as far as I did because I found it on the ADN site. I also
found some stuff in the MSDN Help but unfortunatelly I didn't bookmark it.
Try searching for VBControlExtender and you might find what you need.
Here's what little I understand
'This dimensions it as basically a generic control object
Dim WithEvents AvViewX1 As VBControlExtender
'Now we need to create the control
'
'"AvViewZ.AvViewX.1" = the name of the volo view activeX control
'that is registered in the Windows Registry. If it's not properly
registered then
'the control won't be added and AvViewX1 will be nothing. Not a problem in
'my app since the user just won't be able to preview the drawings.
'
'"AvViewX2" is the name that I am going to give the control so it doen't
conflict
'with any other names.
'
'TabMain is the control that I am going to add it to. I could add it to a
tab, the form, or probably even a frame.
Set AvViewX1 = Controls.Add("AvViewX.AvViewX.1", "AvViewX2", _
TabMain)
Now comes the tricky part. The basic properties like Visible and Enabled
can be accessed by:
AvViewX1.Visible = False
But any extended properties or methods must be accessed by:
AvViewX1.object.ShadingMode
That's about all that I've figured out so far.
--
Rodney McManamy - President
MACSolids - Maximizing AutoCAD Solids
website: www.macsolids.com
"Mark Propst" wrote in message
news:61BE08E0D96A4B58E6972969857E0392@in.WebX.maYIadrTaRb...
> This sounds similar to something I was trying to find out how to do,
> add a control, of whatever kind, to a form - programmatically.
> In your example it's similar to what I was trying but i don't know what
the
> args are for different controls. Where did you find the info on this?
I've
> been reading the help on vbe. but cant find any info on what arg to supply
> to add for example a textbox to Form1
>
> I was trying something like
> Dim NewText as Textbox
> Set NewText = Form1.Controls.Add(
> ...this is where i'm stuck
> the info tip is asking for bstrProgId as String,[name],[visible])as
Control
> from the help under progid:
>
> Returns the ProgID (programmatic ID) for the control represented by the
> VBControl object.
> Syntax
> object.ProgID
>
> but when I try that in a sub there's no method available
> 'just trying to find what the progid for a textbox was
> Private Sub TextBox2_Change()
> Debug.Print TextBox2.progid
> End Sub
>
> when I follow the applies to link in the help for ProgId it takes me to
Add
> ins - can you not put regular controls on a form programatically?
>
> I don't need it to happen at runtime, design time would do for me.
> Do you know anything about this?
> Thanks
> Mark
>
>
> "Rodney McManamy" wrote in message
> news:016C0884B8D4B32FBB1D383C623C75DD@in.WebX.maYIadrTaRb...
> > I'm trying to add the VoloView control to a specific tab at runtime.
The
> > code that I have works but it adds it to the last tab that I was working
> on
> > in the editor. I would like to be able to add it to a specific tab just
> in
> > case I forget to switch back to the appropriate tab.
> >
> > 'Set the TabMain control to the first tab
> > TabMain.Tab = 0
> > ' Add the Volo View Control to Preview the Layouts if it's installed
> > ' on the user's system already
> > Set AvViewX1 = Controls.Add("AvViewX.AvViewX.1", "AvViewX2", _
> > TabMain)
> >
> > Thanks,
> >
> > --
> > Rodney McManamy - President
> > MACSolids - Maximizing AutoCAD Solids
> > website: www.macsolids.com
> >
> >
>
>