473,804 Members | 3,509 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Winform property

I have a winform with a new property. The property type is UserControl.

This is my code fro the property:

private UserControl userControlDeta lle;
public UserControl UserControlDeta lle
{
get { return userControlDeta lle; }
set {
userControlDeta lle = value;
if (userControlDet alle != null)
{
...
}
}
}

I have a chield class from this form, and in the properties window I see the
new property, but I can't set a class derived from the UserControl class.

If I modify the property by code it works well.

¿any idea?

--
Saludos,

Alex Bibiano
+++++++++++++++ +++++++++++
Industrias Laubat, S.A.
Dpto. Informática
Nov 17 '05 #1
1 1749
Inherit a new class from ReferenceConver tor and override the IsValueAllowed
method to allow all objects of type UserControl or dereived from
UserControl. Then apply the class derived from ReferenceConver tor to the
property using the TypeConvertor attribute.

----------------
-Atul, Sky Software http://www.ssware.com
Shell MegaPack For .Net & ActiveX
Windows Explorer GUI Controls
&
Quick-Launch Like Appbars, MSN/Office2003 Style Popups,
System Tray Icons and Shortcuts/Internet Shortcuts
----------------
"Alex Bibiano" <ab******@newsg roups.nospam> wrote in message
news:1A******** *************** ***********@mic rosoft.com...
I have a winform with a new property. The property type is UserControl.

This is my code fro the property:

private UserControl userControlDeta lle;
public UserControl UserControlDeta lle
{
get { return userControlDeta lle; }
set {
userControlDeta lle = value;
if (userControlDet alle != null)
{
...
}
}
}

I have a chield class from this form, and in the properties window I see
the
new property, but I can't set a class derived from the UserControl class.

If I modify the property by code it works well.

¿any idea?

--
Saludos,

Alex Bibiano
+++++++++++++++ +++++++++++
Industrias Laubat, S.A.
Dpto. Informática

Nov 17 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
1236
by: Wayne | last post by:
I have a winform that runs on its own, is it possible to wrap a stand-alone winform in a class? More accurately, is it possible to use a class to call an already established winform?
6
14934
by: randy1200 | last post by:
I'm using Visual Studio 2005 and C#. I need to print a WinForm used for data entry as a graphic. In other words, I need to print the exact WinForm the user sees on the screen. I searched through the newsgroups, and found the code below. This seems reasonable, except for the fact that the author does not provide his SetSeq_Library. This is needed to load the Bitmap variable _ActiveFormImage. Any suggestions on how to capture a WinForm...
6
2814
by: WT | last post by:
Hello, Using VS2005. I have an assembly library that can be called from a Web site asp.net application or from a winform application. From this library I need to retrieve a path using simply a key like 'libPath'. As far as winform and asp.net share the same common base class for settings, SettingsBase, how to manage this ? For winform the value should be set in app.config and for web site in
2
3743
by: jyanmin.fang | last post by:
Hi, In my current project, I need to embed an .NET winform usercontrol in the aspx page (via <Objecttag). This winform usercontrol has an event called DoEvent (void DoEvent()). This winform usercontrol will fire this event upon certain action by the user. I tried to let the aspx page subscribe to this event via <script for="winObj1" event="DoEvent()" language="javascript"> window.alert("window control event happen!");
0
9588
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10340
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10327
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10085
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9161
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5527
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5663
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4302
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3828
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.