Click here to Skip to main content
15,893,486 members
Home / Discussions / C#
   

C#

 
AnswerRe: backcolor in load form Pin
jeyapandian27-Sep-06 22:08
jeyapandian27-Sep-06 22:08 
GeneralRe: backcolor in load form Pin
faladrim27-Sep-06 22:50
faladrim27-Sep-06 22:50 
QuestionEncrypting a password Pin
Sonu.T27-Sep-06 21:43
Sonu.T27-Sep-06 21:43 
AnswerRe: Encrypting a password Pin
aamironline28-Sep-06 18:56
aamironline28-Sep-06 18:56 
Questiona problem in UserControl Pin
dehghan198427-Sep-06 21:35
dehghan198427-Sep-06 21:35 
AnswerRe: a problem in UserControl Pin
jeyapandian27-Sep-06 22:05
jeyapandian27-Sep-06 22:05 
GeneralRe: a problem in UserControl Pin
dehghan198428-Sep-06 2:18
dehghan198428-Sep-06 2:18 
GeneralRe: a problem in UserControl Pin
jeyapandian28-Sep-06 18:48
jeyapandian28-Sep-06 18:48 
hi you can overide controlsadded in your usercontrol and destroy the added component and create new instance of the same and add to your panel.

but there is a problem.. as it can add to the controls to panel but you can relocate the cotrol.

The code is below,sorry dont have much time to explore more in to it.Dont know how helpful its to you..

good luck.

bool _tmpOnRelocate = false;
protected override void OnControlAdded(ControlEventArgs e)
{
try
{

DesHost = this.Container as IDesignerHost;
if (DesHost != null && e.Control.Parent == this)
{
if (_tmpOnRelocate) return;
this.SuspendLayout();
Control _Holder = e.Control;
_Holder.Location = new Point(0, 0);
_tmpOnRelocate = true;
IComponent _tmpComp = DesHost.CreateComponent(_Holder.GetType());
DesHost.DestroyComponent(e.Control as Component);
((Control)_tmpComp).Parent = this.panel2;
this.panel2.Controls.Add(_tmpComp as Control);
this.ResumeLayout();
_tmpOnRelocate = false;
}
else
{
base.OnControlAdded(e);
}
}
catch (Exception ee)
{
MessageBox.Show(ee.Message);
}

//base.OnControlAdded(e);
}


Where there is a will,there is a way.

GeneralRe: a problem in UserControl Pin
dehghan19844-Oct-06 21:38
dehghan19844-Oct-06 21:38 
QuestionRelative path Pin
Parshant Verma27-Sep-06 20:46
Parshant Verma27-Sep-06 20:46 
AnswerRe: Relative path Pin
albCode27-Sep-06 20:59
albCode27-Sep-06 20:59 
QuestionLive mail look in windows form Pin
Mr.Sam27-Sep-06 20:37
Mr.Sam27-Sep-06 20:37 
Questionregular expression for time Pin
saqib8227-Sep-06 20:31
saqib8227-Sep-06 20:31 
AnswerRe: regular expression for time Pin
saqib8227-Sep-06 20:33
saqib8227-Sep-06 20:33 
QuestionHelp! Segmented Download problem! Pin
cilly_brain27-Sep-06 20:08
cilly_brain27-Sep-06 20:08 
QuestionCrystal Report [modified] Pin
tyagi020827-Sep-06 20:08
tyagi020827-Sep-06 20:08 
AnswerRe: Crystal Report Pin
jeyapandian27-Sep-06 20:19
jeyapandian27-Sep-06 20:19 
Questioncan we do this? Pin
sharma sanjeev27-Sep-06 18:59
sharma sanjeev27-Sep-06 18:59 
AnswerRe: can we do this? Pin
eggsovereasy28-Sep-06 4:17
eggsovereasy28-Sep-06 4:17 
QuestionHelp me out please!! Pin
Niiiissssshhhhhuuuuu27-Sep-06 18:37
Niiiissssshhhhhuuuuu27-Sep-06 18:37 
AnswerRe: Help me out please!! Pin
Nader Elshehabi27-Sep-06 18:43
Nader Elshehabi27-Sep-06 18:43 
GeneralRe: Help me out please!! Pin
Niiiissssshhhhhuuuuu27-Sep-06 19:18
Niiiissssshhhhhuuuuu27-Sep-06 19:18 
Questionget data from a website - need help Pin
dinhzap27-Sep-06 18:09
dinhzap27-Sep-06 18:09 
AnswerRe: get data from a website - need help Pin
Christian Graus27-Sep-06 18:24
protectorChristian Graus27-Sep-06 18:24 
GeneralRe: get data from a website - need help Pin
dinhzap28-Sep-06 0:20
dinhzap28-Sep-06 0:20 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.