Wrox Programmer Forums
| Search | Today's Posts | Mark Forums Read
Pro VB 6 For advanced Visual Basic coders working in version 6 (not .NET). Beginning-level questions will be redirected to other forums, including Beginning VB 6.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Pro VB 6 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
Old December 1st, 2004, 01:51 AM
Registered User
Join Date: Dec 2004
Location: , , India.
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to dhanyavnair
Default Linking UserControls

Hello all ,

 i am creating an application that has 7 ActiveX

Usercontorl objects.I have to link these 7 usercontrol

so that when the user clicks a button in the first user

control, the second one will be loaded.I tried Load

usercontrol2 in the click event of the usercontrol1. But

it is showing error.Anybody please help me

Thanks in advance,

Old December 1st, 2004, 03:22 AM
Friend of Wrox
Join Date: Oct 2003
Location: Cochin, Kerala, India.
Posts: 463
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to madhukp

A simple method.

You can keep all the controls in the form and flip the visibility whenever you want. Load method is normally used if you want to open multiple instances of same control.

There are drawbacks for this. It will take more memory and adversely affect performance.
Old December 1st, 2004, 02:41 PM
Friend of Wrox
Join Date: Jun 2003
Location: Alameda, ca, USA.
Posts: 627
Thanks: 0
Thanked 0 Times in 0 Posts

You can add a control at run time using the Control collection:

dim ctl as myActiveXProject.ControlName
set ctl = Me.Controls.Add("myActiveXProject.ControlName", "ControlName")
ctl.Visible = True
ctl.Move ... etc etc

look for the MSDN documentation, but that should be enough

Similar Threads
Thread Thread Starter Forum Replies Last Post
Usercontrols yveerabhadrarao ADO.NET 1 August 3rd, 2007 06:57 AM
Javascript in UserControls chakravarthy_vb Classic ASP Components 1 March 30th, 2005 06:35 AM
Usercontrols problem coddy ASP.NET 1.0 and 1.1 Basics 5 June 11th, 2004 11:23 AM
UserControls in DataLists shmacgregor ASP.NET 1.0 and 1.1 Basics 12 April 5th, 2004 04:11 PM
Reusability of UserControls jara VS.NET 2002/2003 0 August 14th, 2003 05:52 PM

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.