Click here to Skip to main content
16,005,339 members
Home / Discussions / C#
   

C#

 
GeneralRe: this.MaximumSize issue Pin
Harvey Saayman18-Feb-08 23:28
Harvey Saayman18-Feb-08 23:28 
GeneralRe: this.MaximumSize issue Pin
Giorgi Dalakishvili18-Feb-08 23:18
mentorGiorgi Dalakishvili18-Feb-08 23:18 
Generalsetting folder/file access after creation Pin
marky77718-Feb-08 22:33
marky77718-Feb-08 22:33 
GeneralRe: setting folder/file access after creation Pin
CKnig18-Feb-08 23:17
CKnig18-Feb-08 23:17 
GeneralRe: setting folder/file access after creation Pin
marky77718-Feb-08 23:42
marky77718-Feb-08 23:42 
GeneralRe: setting folder/file access after creation Pin
marky77719-Feb-08 0:00
marky77719-Feb-08 0:00 
General"Child is not a child control of this parant" Pin
kakanis18-Feb-08 22:14
kakanis18-Feb-08 22:14 
GeneralRe: "Child is not a child control of this parant" Pin
LongRange.Shooter19-Feb-08 8:03
LongRange.Shooter19-Feb-08 8:03 
You are not clearly defining your problem which makes it hard for anyone to answer this.
Here is what I think you are saying:

You have a panel that can have a control added to it. (It does not matter if it is your control or a framework control)
So you have logic as follows:
Panel workarea = new Panel;
workarea.OnControlAdded += new EventHandler( LimitControlsHandler );
workarea.Controls.Add( myCustomControl );


So this will then raise an event everytime a new control is added to the panel. So now when that happens your logic should be as follows:

public void LimitControlHandler(object sender, EventArgs args)
{
      if ( workarea.Controls.Count > 1 )
         workarea.Controls.RemoveAt(1);
}


Assuming that the RemoveAt is totally valid logic for the Panel, then your logic should work just fine. Look at what I've listed here and see where your code differs. Then troubleshoot it. It is difficult to tell you what you are doing wrong with the poor amount of information you are providing in this question.
GeneralFind multiple instance using Mutex Pin
CodingLover18-Feb-08 22:11
CodingLover18-Feb-08 22:11 
GeneralRe: Find multiple instance using Mutex Pin
Giorgi Dalakishvili18-Feb-08 22:33
mentorGiorgi Dalakishvili18-Feb-08 22:33 
GeneralRe: Find multiple instance using Mutex Pin
CodingLover18-Feb-08 22:41
CodingLover18-Feb-08 22:41 
GeneralRe: Find multiple instance using Mutex Pin
Giorgi Dalakishvili18-Feb-08 22:58
mentorGiorgi Dalakishvili18-Feb-08 22:58 
GeneralRe: Find multiple instance using Mutex Pin
CodingLover18-Feb-08 23:41
CodingLover18-Feb-08 23:41 
GeneralRe: Find multiple instance using Mutex Pin
Giorgi Dalakishvili18-Feb-08 23:48
mentorGiorgi Dalakishvili18-Feb-08 23:48 
GeneralRe: Find multiple instance using Mutex Pin
CodingLover18-Feb-08 23:57
CodingLover18-Feb-08 23:57 
GeneralRe: Find multiple instance using Mutex Pin
Giorgi Dalakishvili19-Feb-08 0:01
mentorGiorgi Dalakishvili19-Feb-08 0:01 
GeneralRe: Find multiple instance using Mutex Pin
CodingLover20-Feb-08 17:44
CodingLover20-Feb-08 17:44 
Questioncreating graphs in C# .net Pin
Bhaskar Ravindranath18-Feb-08 22:10
Bhaskar Ravindranath18-Feb-08 22:10 
GeneralRe: creating graphs in C# .net Pin
Christian Graus18-Feb-08 22:13
protectorChristian Graus18-Feb-08 22:13 
GeneralMHT File Problem. Pin
hdv21218-Feb-08 21:53
hdv21218-Feb-08 21:53 
GeneralRe: MHT File Problem. Pin
Pete O'Hanlon18-Feb-08 22:23
mvePete O'Hanlon18-Feb-08 22:23 
GeneralRe: MHT File Problem. [modified] Pin
hdv21218-Feb-08 22:55
hdv21218-Feb-08 22:55 
GeneralRe: MHT File Problem. Pin
Pete O'Hanlon18-Feb-08 23:19
mvePete O'Hanlon18-Feb-08 23:19 
QuestionUpdate mysql table from datagridview Pin
baranils18-Feb-08 21:07
baranils18-Feb-08 21:07 
GeneralRe: Update mysql table from datagridview Pin
Mircea Puiu18-Feb-08 21:40
Mircea Puiu18-Feb-08 21:40 

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.