Click here to Skip to main content
15,911,306 members
Home / Discussions / C#
   

C#

 
GeneralRe: Really hard question #1 Pin
eggie514-May-03 9:36
eggie514-May-03 9:36 
GeneralRe: Really hard question #1 Pin
James T. Johnson14-May-03 14:13
James T. Johnson14-May-03 14:13 
GeneralRe: Really hard question #1 Pin
eggie514-May-03 16:57
eggie514-May-03 16:57 
GeneralRe: Really hard question #1 Pin
James T. Johnson14-May-03 17:07
James T. Johnson14-May-03 17:07 
GeneralRe: Really hard question #1 Pin
eggie514-May-03 17:46
eggie514-May-03 17:46 
GeneralRe: Really hard question #1 Pin
jeff_martin14-May-03 5:48
jeff_martin14-May-03 5:48 
Generalquestion on format color for DataGrid Pin
cruscal13-May-03 18:14
cruscal13-May-03 18:14 
QuestionResizable control? Pin
Wmzong13-May-03 16:41
Wmzong13-May-03 16:41 
GeneralDataGrid... Row Selection & Column Header Alignment Pin
jmt9n13-May-03 13:28
jmt9n13-May-03 13:28 
Generaliconic child window Pin
Anonymous13-May-03 12:44
Anonymous13-May-03 12:44 
GeneralWindows Form Dialog when Logged Out Pin
Ingram Leedy13-May-03 10:53
Ingram Leedy13-May-03 10:53 
GeneralRe: Windows Form Dialog when Logged Out Pin
IrvTheSwirv14-May-03 2:01
sussIrvTheSwirv14-May-03 2:01 
GeneralRe: Windows Form Dialog when Logged Out Pin
Ingram Leedy14-May-03 10:56
Ingram Leedy14-May-03 10:56 
GeneralWindows Forms Pin
pahlsson13-May-03 10:11
pahlsson13-May-03 10:11 
GeneralRe: Windows Forms Pin
David Stone13-May-03 10:38
sitebuilderDavid Stone13-May-03 10:38 
GeneralRe: Windows Forms Pin
pahlsson13-May-03 22:39
pahlsson13-May-03 22:39 
QuestionHow to get screen area Pin
J. Dunlap13-May-03 9:24
J. Dunlap13-May-03 9:24 
AnswerRe: How to get screen area Pin
leppie13-May-03 11:49
leppie13-May-03 11:49 
GeneralRe: How to get screen area Pin
J. Dunlap13-May-03 18:17
J. Dunlap13-May-03 18:17 
QuestionFind the namespace an object is from? Pin
FruitBatInShades13-May-03 8:43
FruitBatInShades13-May-03 8:43 
AnswerRe: Find the namespace an object is from? Pin
leppie13-May-03 9:05
leppie13-May-03 9:05 
GeneralRe: Find the namespace an object is from? Pin
FruitBatInShades13-May-03 9:28
FruitBatInShades13-May-03 9:28 
GeneralControls created in one thread cannot parent in other thread - delegate. Pin
Mrso13-May-03 5:37
Mrso13-May-03 5:37 
I have a Form that react to a delegate callback and create child controls according to the delegate event argument. But when I try to create the controls and set the parent to the Form at runtime, the subjected exception raised. Any solution on this?

e.g.
Class CA : System.Windows.Forms.Form
{
public CA()
{
CB b = new CB();
b.MyEvent += new OnMyEventHandler( this.OnMyEvent );
}
protected void OnMyEvent( int nCount )
{
for ( int i = 0; i < nCount; i ++ )
{
Button btn = new Button();
btn.Parent = this; <----- Exception
btn.Location = new Point( 100 + i * 100, 10 );
btn.Show();
}
}
}

public delegate void OnMyEventHandler( int nCount );
Class CB
{
public event OnMyEventHandler myEvent;
public CB
{
if ( myEvent != null )
myEvent( 5 );
}
}

Thanks!
GeneralRe: Controls created in one thread cannot parent in other thread - delegate. Pin
leppie13-May-03 9:07
leppie13-May-03 9:07 
GeneralRe: Controls created in one thread cannot parent in other thread - delegate. Pin
Mrso14-May-03 4:19
Mrso14-May-03 4:19 

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.