Treeview at run time 
Author Message
 Treeview at run time

Dim tv as treeview
set tv = controls.add("progid","tv")
Could you tell me whats is the progid


Mon, 08 Sep 2003 07:37:47 GMT  
 Treeview at run time


Quote:
> Dim tv as treeview
> set tv = controls.add("progid","tv")
> Could you tell me whats is the progid

If you add the Microsoft Windows Common Controls library with the treeview
to a VB project and then go to the object browser (View / Object Browser)
you will find TreeView as a member of MSComctlLib

In the immediate window try this:
Set o=Form1.Controls.Add("MSComctlLib.TreeView","test")

if that works then you have the info you need.  If it fails (and it will
<g>) then VB reports an error and tells you what progid you need to use to
get the control.  In this case it will tell you the name is
MSComctlLib.TreeCtl.2 (or whatever version you are referencing).

That process will let you find the ids for other controls as well.



Mon, 08 Sep 2003 08:01:09 GMT  
 Treeview at run time
Thanks very much
Quote:
-----Original Message-----



> Dim tv as treeview
> set tv = controls.add("progid","tv")
> Could you tell me whats is the progid

If you add the Microsoft Windows Common Controls library with the treeview
to a VB project and then go to the object browser (View / Object Browser)
you will find TreeView as a member of MSComctlLib

In the immediate window try this:
Set o=Form1.Controls.Add("MSComctlLib.TreeView","test")

if that works then you have the info you need.  If it fails (and it will
<g>) then VB reports an error and tells you what progid you need to use to
get the control.  In this case it will tell you the name is
MSComctlLib.TreeCtl.2 (or whatever version you are referencing).

That process will let you find the ids for other controls as well.

.



Tue, 09 Sep 2003 00:18:53 GMT  
 Treeview at run time
Actually the TreeView is declared as MSComCtlLib.TreeCtrl. Try that


Quote:



> > Dim tv as treeview
> > set tv = controls.add("progid","tv")
> > Could you tell me whats is the progid

> If you add the Microsoft Windows Common Controls library with the treeview
> to a VB project and then go to the object browser (View / Object Browser)
> you will find TreeView as a member of MSComctlLib

> In the immediate window try this:
> Set o=Form1.Controls.Add("MSComctlLib.TreeView","test")

> if that works then you have the info you need.  If it fails (and it will
> <g>) then VB reports an error and tells you what progid you need to use to
> get the control.  In this case it will tell you the name is
> MSComctlLib.TreeCtl.2 (or whatever version you are referencing).

> That process will let you find the ids for other controls as well.



Tue, 09 Sep 2003 06:29:42 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. Assign a treeview at design run time to other at design time

2. TreeView in Access 97 run-time app

3. TreeView hangs at run-time

4. Microsoft Visual C++ Run time library Run time error R6025

5. Code running in design time or run-time?

6. Microsoft Visual C++ Run time library Run time error R6025

7. Run-Time Error 2486 - Can't Carry Out Operation at Present Time

8. HELP! Time-Out on Run-Time

9. web service and updating web reference with vb.net design time vs run time

10. getting run-time behavior of a contained control in a user control at design time

11. web service and updating web reference with vb.net design time vs run time

12. Design time vs Run time

 

 
Powered by phpBB® Forum Software