|
-
Sep 6th, 2007, 11:19 AM
#1
Thread Starter
Fanatic Member
[2005] Custom Component Property Default
I created a version of the standard TextBox that adds an IsValid property. When I started using this control in my project, I had IsValid initially set to False inside my component. Now, I want to have it initially set to true. I made the changes to the component and recompiled the code. Everywhere I already have this control, it still remembers this default value since it is in the .Designer file.
How do I get this to update when I make a change? Surely, I don't have to manually do this.
Code:
<System.ComponentModel.Browsable(False)> _
Property IsValid() As Boolean
Get
Return _IsValid
End Get
Set(ByVal value As Boolean)
_IsValid = value
End Set
End Property
Last edited by Aspnot; Sep 6th, 2007 at 12:41 PM.
My.Settings.Signature = String.Empty
-
Sep 6th, 2007, 11:25 AM
#2
Frenzied Member
Re: [2005] Custom Component Property Default
If you are saying that you have already dropped a control, say, on to a form and set it's properties; then, yes you'd have to go back a reset the properties of each control on the form.
-
Sep 6th, 2007, 12:41 PM
#3
Thread Starter
Fanatic Member
Re: [2005] Custom Component Property Default
Ouch. That's what I was affraid of.
My.Settings.Signature = String.Empty
-
Sep 6th, 2007, 12:49 PM
#4
Re: [2005] Custom Component Property Default
Did you replace the control on the forms with the new compiled version ? When you drop the new version on your forms it should automatically regenerate new designer code and if your new control has the default as false then thats what will be set.
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 
-
Sep 6th, 2007, 01:33 PM
#5
Frenzied Member
Re: [2005] Custom Component Property Default
Remember these two things:
1. Each instance of a control that is dropped on the form becomes it's own instance of the class that created it -- once you modify it, it becomes unique.
2. Would you like it if Micorsoft suddenly changed the default backcolor of a button to black and then sent out the new dll and suddenly every project you had ever built had it's buttons turn black?
You wouldn't expect that -- so that's not how it works...Thankfully.
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
|