Click here to Skip to main content
15,888,351 members
Home / Discussions / C#
   

C#

 
QuestionNew to threading... Pin
Jacob Dixon18-Mar-09 18:40
Jacob Dixon18-Mar-09 18:40 
AnswerRe: New to threading... [modified] Pin
dan!sh 18-Mar-09 19:06
professional dan!sh 18-Mar-09 19:06 
QuestionHow to handle a User Control Event ? Pin
Pankaj Nikam18-Mar-09 18:32
professionalPankaj Nikam18-Mar-09 18:32 
AnswerRe: How to handle a User Control Event ? Pin
Member 56545118-Mar-09 20:49
Member 56545118-Mar-09 20:49 
GeneralRe: How to handle a User Control Event ? Pin
Pankaj Nikam18-Mar-09 21:21
professionalPankaj Nikam18-Mar-09 21:21 
AnswerRe: How to handle a User Control Event ? Pin
dan!sh 18-Mar-09 21:45
professional dan!sh 18-Mar-09 21:45 
GeneralRe: How to handle a User Control Event ? Pin
Pankaj Nikam19-Mar-09 7:21
professionalPankaj Nikam19-Mar-09 7:21 
AnswerRe: How to handle a User Control Event ? Pin
DaveyM6919-Mar-09 0:04
professionalDaveyM6919-Mar-09 0:04 
If you need to be able to set Accept and Cancel you can't do it with the designer.

In the user control create readonly properties for Accept and Cancel buttons
[Browsable(false),
DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public IButtonControl AcceptButton
{
    get { return button1; }
}
[Browsable(false),
DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public IButtonControl CancelButton
{
    get { return button2; }
}
then in the host form you can set in code
AcceptButton = userControl11.AcceptButton;
CancelButton = userControl11.CancelButton;

If you want it through the designer then you can only have one button. Just make the user control also derive from IButtonControl and implement it to use the button in question.

Dave
BTW, in software, hope and pray is not a viable strategy. (Luc Pattyn)
Visual Basic is not used by normal people so we're not covering it here. (Uncyclopedia)

GeneralRe: How to handle a User Control Event ? Pin
dan!sh 19-Mar-09 2:27
professional dan!sh 19-Mar-09 2:27 
GeneralRe: How to handle a User Control Event ? Pin
DaveyM6919-Mar-09 2:53
professionalDaveyM6919-Mar-09 2:53 
GeneralRe: How to handle a User Control Event ? Pin
Pankaj Nikam19-Mar-09 7:19
professionalPankaj Nikam19-Mar-09 7:19 
GeneralRe: How to handle a User Control Event ? Pin
DaveyM6919-Mar-09 7:33
professionalDaveyM6919-Mar-09 7:33 
GeneralRe: How to handle a User Control Event ? Pin
Pankaj Nikam19-Mar-09 7:38
professionalPankaj Nikam19-Mar-09 7:38 
QuestionIs there a method summary snippet? Pin
12Code18-Mar-09 18:32
12Code18-Mar-09 18:32 
AnswerRe: Is there a method summary snippet? Pin
Abhijit Jana18-Mar-09 18:39
professionalAbhijit Jana18-Mar-09 18:39 
QuestionShortcut keys and macros Pin
12Code18-Mar-09 17:35
12Code18-Mar-09 17:35 
AnswerRe: Shortcut keys and macros Pin
Abhijit Jana18-Mar-09 18:21
professionalAbhijit Jana18-Mar-09 18:21 
GeneralRe: Shortcut keys and macros [modified] Pin
12Code18-Mar-09 19:01
12Code18-Mar-09 19:01 
AnswerRe: Shortcut keys and macros Pin
Pankaj Nikam18-Mar-09 18:35
professionalPankaj Nikam18-Mar-09 18:35 
GeneralRe: Shortcut keys and macros Pin
12Code18-Mar-09 19:17
12Code18-Mar-09 19:17 
GeneralRe: Shortcut keys and macros Pin
Pankaj Nikam18-Mar-09 19:36
professionalPankaj Nikam18-Mar-09 19:36 
Questionhow to join 2 tables in a data set Pin
Nine_18-Mar-09 17:31
Nine_18-Mar-09 17:31 
AnswerRe: how to join 2 tables in a data set Pin
tech60318-Mar-09 19:06
tech60318-Mar-09 19:06 
GeneralRe: how to join 2 tables in a data set Pin
Nine_19-Mar-09 1:29
Nine_19-Mar-09 1:29 
GeneralRe: how to join 2 tables in a data set Pin
tech60319-Mar-09 3:06
tech60319-Mar-09 3:06 

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.