Click here to Skip to main content
15,908,274 members
Home / Discussions / C#
   

C#

 
GeneralSendMessage/PostMessage via socket Pin
BLaZiNiX31-Mar-02 22:33
BLaZiNiX31-Mar-02 22:33 
Questionhow to immigrate c++'s union? Pin
31-Mar-02 19:32
suss31-Mar-02 19:32 
AnswerRe: how to immigrate c++'s union? Pin
Paul M Watt31-Mar-02 20:35
mentorPaul M Watt31-Mar-02 20:35 
AnswerRe: how to immigrate c++'s union? Pin
James T. Johnson1-Apr-02 22:55
James T. Johnson1-Apr-02 22:55 
GeneralRe: how to immigrate c++'s union? Pin
2-Apr-02 14:59
suss2-Apr-02 14:59 
QuestionCan a component obtain a reference to its container object? Pin
31-Mar-02 14:02
suss31-Mar-02 14:02 
AnswerRe: Can a component obtain a reference to its container object? Pin
James T. Johnson31-Mar-02 17:58
James T. Johnson31-Mar-02 17:58 
GeneralRe: Can a component obtain a reference to its container object? Pin
1-Apr-02 6:38
suss1-Apr-02 6:38 
That sounded good, so I tried this test:

I built a simple component with this method:

public void ChangeParentColor()
{
if( Container is Form )
{
Form containerForm = (Form)Container;
containerForm.BackColor = Color.Aqua;
}
}

This built just fine. I placed this component on a new form, along with a button. When the button was clicked, this method fired:

private void buttonclick(object sender, System.EventArgs e)
{
containerTestComponent1.ChangeParentColor();
button1.Text="I was clicked";
}

This project also built just fine, but even though the caption of the button changes properly (demonstrating that the button event fired), the color of the form refused to change to aqua.
GeneralRe: Can a component obtain a reference to its container object? Pin
Andy Smith1-Apr-02 6:50
Andy Smith1-Apr-02 6:50 
GeneralRe: Can a component obtain a reference to its container object? Pin
1-Apr-02 9:14
suss1-Apr-02 9:14 
GeneralRe: Can a component obtain a reference to its container object? Pin
1-Apr-02 14:10
suss1-Apr-02 14:10 
GeneralRe: Can a component obtain a reference to its container object? Pin
Andy Smith1-Apr-02 14:50
Andy Smith1-Apr-02 14:50 
GeneralRe: Can a component obtain a reference to its container object? Pin
James T. Johnson1-Apr-02 16:23
James T. Johnson1-Apr-02 16:23 
GeneralRe: Can a component obtain a reference to its container object? Pin
James T. Johnson1-Apr-02 16:25
James T. Johnson1-Apr-02 16:25 
GeneralRe: Can a component obtain a reference to its container object? Pin
Andy Smith1-Apr-02 18:44
Andy Smith1-Apr-02 18:44 
GeneralRe: Can a component obtain a reference to its container object? Pin
James T. Johnson1-Apr-02 22:52
James T. Johnson1-Apr-02 22:52 
GeneralRoundRect Pin
Not Active31-Mar-02 10:23
mentorNot Active31-Mar-02 10:23 
GeneralRe: RoundRect Pin
James T. Johnson31-Mar-02 13:03
James T. Johnson31-Mar-02 13:03 
GeneralRe: RoundRect Pin
Christian Graus31-Mar-02 13:26
protectorChristian Graus31-Mar-02 13:26 
GeneralRe: RoundRect Pin
Not Active31-Mar-02 13:58
mentorNot Active31-Mar-02 13:58 
Generaluxtheme.dll and windows XP themes in C# Pin
Stephan Johnson31-Mar-02 9:48
Stephan Johnson31-Mar-02 9:48 
GeneralRe: uxtheme.dll and windows XP themes in C# Pin
James T. Johnson31-Mar-02 12:46
James T. Johnson31-Mar-02 12:46 
GeneralRe: uxtheme.dll and windows XP themes in C# Pin
Not Active31-Mar-02 14:02
mentorNot Active31-Mar-02 14:02 
GeneralRe: uxtheme.dll and windows XP themes in C# Pin
Stephan Johnson31-Mar-02 21:13
Stephan Johnson31-Mar-02 21:13 
GeneralRe: uxtheme.dll and windows XP themes in C# Pin
James T. Johnson2-Apr-02 19:25
James T. Johnson2-Apr-02 19:25 

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.