473,326 Members | 1,972 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,326 software developers and data experts.

Custom component as private member of parent form

Hi,
I have develope a custom component i want this component as private
member of parent form but i can't. My component declared in
InitializeControls() function of designer.Thanx in advance for help.

Jul 3 '06 #1
3 1712
Zip your file here or maybe paste your code.

chanmm

"hassan" <kh*************@gmail.comwrote in message
news:11**********************@h44g2000cwa.googlegr oups.com...
Hi,
I have develope a custom component i want this component as private
member of parent form but i can't. My component declared in
InitializeControls() function of designer.Thanx in advance for help.

Jul 3 '06 #2
Hi Chanmm,
This is my code.

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.ComponentModel.Design;
using System.Drawing;
using System.Data;
using System.Text;
using System.Windows.Forms;
using System.Windows.Forms.Design;
using System.Reflection;
using System.ComponentModel.Design.Serialization;
using System.IO;
using System.Collections;

namespace MyCtrl
{
[DesignerSerializer(typeof(MyCtrlSerializer),
typeof(CodeDomSerializer)),MergableProperty(true)]
[Designer(typeof(Designer.MyCtrlDesigner)), ToolboxItem(true)]
public class MyCtrlMgr : Component, ISupportInitialize
{

#region Constructor

public SearchBindingMgr()
{
InitializeComponent();
}
#endregion

#region Methods

private void InitializeComponent()
{
_bDesingMode = DesignMode;
}
#endregion

#region ISupportInitialize Method

public virtual void BeginInit()
{
}
public virtual void EndInit()
{
}

#endregion

#region Properties

[EditorBrowsable(EditorBrowsableState.Never), Browsable(false),
DesignerSerializationVisibility(DesignerSerializat ionVisibility.Hidden)]
public Control ParentControl
{
get
{
return _parentControl;
}
set
{
_parentControl = value;
}

}

public bool Mode
{
get
{
return base.DesignMode;
}
}
public static bool DesignTime
{
get
{
return _bDesingMode;
}
set
{
_bDesingMode = value;
}
}

#endregion

#region Attributes
private Control _parentControl;
private static bool _bDesingMode;
}

Thanx in advance for ur help.

Jul 4 '06 #3
Hi,
Got it problem was my own serializer. Thanx

Jul 4 '06 #4

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

Similar topics

3
by: bruce | last post by:
Hello, I am trying to figure out how to use a class with a custom event as a wrapper for a subform so that I can automatically trigger things to happen on the parent form when the custom event...
5
by: ross kerr | last post by:
Hi All, I am extending the combobox to create a control that selects an item based on the text the user is typing into the text area of the control. I have an issue that occurs only when i...
2
by: AMDRIT | last post by:
Hello everyone, I have created a custom component and one of its properties is a class object with it's own properties. During runtime, I can assign values to the class object properties just...
19
by: Jamey Shuemaker | last post by:
I'm in the process of expanding my knowledge and use of Class Modules. I've perused MSDN and this and other sites, and I'm pretty comfortable with my understanding of Class Modules with the...
3
by: Richard Ryerson | last post by:
I have a general DataGridComboBoxColumn that I built using the Example in the .NET 2003 Combined Collection help file (that was a data time picker). I am able to assign a data source and display...
4
by: hassan | last post by:
I want to add a function in parent form of a custom component from component. How this is possible.
0
by: ChopStickr | last post by:
I have a custom control that is embedded (using the object tag) in an html document. The control takes a path to a local client ini file. Reads the file. Executes the program specified in...
6
by: forest demon | last post by:
i have a custom control that gets loaded at runtime. i need to be able to access a property of a control thats part of the main form, through the clcik event of the custom control. i may be...
1
by: asharda | last post by:
I have a custom property grid. I am using custom property grid as I do not want the error messages that the propertygrid shows when abphabets are entered in interger fields. The custom property...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you

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.