|
-
Oct 3rd, 2009, 10:30 PM
#1
Thread Starter
Hyperactive Member
Usercontrol not visible
Hello,
I've created a UserControl. When I place one on a form, all is well. I set the Index property to "0". In my code I use the Load UserControl command to create an additional control at runtime. I have also set the visible property to "True" after it is created, yet it is still not visible. Of course, I get no compilation or runtime errors. Any ideas?
Thanks
-
Oct 4th, 2009, 02:58 AM
#2
Re: Usercontrol not visible
So you do see the first one but not the second? Could it be directly behind the first one if you are not designating .Top, .Left, .Width and .Height properties for it?
VB/Office Guru™ (AKA: Gangsta Yoda™ ®)
I dont answer coding questions via PM. Please post a thread in the appropriate forum. 
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it! 
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6 
-
Oct 9th, 2009, 03:31 PM
#3
PowerPoster
Re: Usercontrol not visible
RobDog888 has right
if you don't tell the position or size, the VB will use the position and size padron. the position is 0,0(zero).
but anotherthing, you put the 2nd control visible property in true?
(when we create dynamic controls you must put the visible property in true, for see them)
i hope help you more
-
Oct 9th, 2009, 03:39 PM
#4
Re: Usercontrol not visible
When dynamically adding controls, the initial position is the position of the lowest bound control. And its zOrder is the lowest. So any new control is added behind the lowest bound control. Position and/or zOrder of the newly loaded control needs to be modified to see it.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|