Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Visual Basic > VB 6 Visual Basic 6 > Pro VB 6
Password Reminder
| FAQ | Members List | Calendar | 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 tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
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,

Reply With Quote
  #2 (permalink)  
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.
Reply With Quote
  #3 (permalink)  
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
Reply With Quote

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

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

All times are GMT -4. The time now is 01:26 PM.

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