Click here to Skip to main content
15,900,378 members
Home / Discussions / C#
   

C#

 
Question[Message Deleted] Pin
DJ24530-Oct-08 0:18
DJ24530-Oct-08 0:18 
AnswerRe: Changing a datagridview's combobox items based on another combobox Pin
leppie30-Oct-08 0:46
leppie30-Oct-08 0:46 
Questionref parameter Pin
arkiboys29-Oct-08 23:45
arkiboys29-Oct-08 23:45 
AnswerRe: ref parameter Pin
Mbah Dhaim30-Oct-08 0:12
Mbah Dhaim30-Oct-08 0:12 
GeneralRe: ref parameter Pin
arkiboys30-Oct-08 3:20
arkiboys30-Oct-08 3:20 
AnswerRe: ref parameter Pin
CPallini30-Oct-08 1:29
mveCPallini30-Oct-08 1:29 
QuestionHow to make this in C# [modified] Pin
duta29-Oct-08 23:42
duta29-Oct-08 23:42 
AnswerRe: How to make this in C# Pin
Eddy Vluggen30-Oct-08 0:37
professionalEddy Vluggen30-Oct-08 0:37 
Someone who is actually researching! That deserves some help Smile | :)

duta wrote:
1) Those buttons are customs controls?


Those buttons won't be custom controls in the original program. However, Custom Controls would be an idea if you want to build something like that yourself. You could also use a "real" button, but those aren't flat.

duta wrote:
2) How to have just one function which triggers the pressed keys?


Drag two buttons on the screen, and double-click on the OnClick handler of button1. This will create an event-handler for button1. Next, click once on the OnClick-handler of button2, and you'll get a list of events that have been built. Choose the event of button1. Both now point to the same event.

You can also do this in code. First, create a general event-handler for the buttons;

void button1_Click(object sender, EventArgs e)
{
    // Sender tells you what button has been pressed
}


In the load-event of your form, add some code to wire-up the events;

this.button1.Click += new EventHandler(button1_Click);


You can wire the second button to the same handler;
this.button2.Click += new EventHandler(button1_Click);

This way the Click-event of button2 will point to the eventhandler as declared for button1.

Hope this helps Smile | :)
QuestionHow to use satellite assembly from GAC Pin
Software_Guy_12329-Oct-08 23:10
Software_Guy_12329-Oct-08 23:10 
AnswerRe: How to use satellite assembly from GAC Pin
Sathesh Sakthivel29-Oct-08 23:24
Sathesh Sakthivel29-Oct-08 23:24 
QuestionHELP! SETS Pin
sudany_zool29-Oct-08 22:21
sudany_zool29-Oct-08 22:21 
AnswerRe: HELP! SETS Pin
Christian Graus29-Oct-08 22:47
protectorChristian Graus29-Oct-08 22:47 
GeneralRe: HELP! SETS Pin
sudany_zool30-Oct-08 0:20
sudany_zool30-Oct-08 0:20 
GeneralRe: HELP! SETS Pin
leppie30-Oct-08 0:39
leppie30-Oct-08 0:39 
GeneralRe: HELP! SETS Pin
PIEBALDconsult30-Oct-08 4:57
mvePIEBALDconsult30-Oct-08 4:57 
GeneralRe: HELP! SETS Pin
leppie30-Oct-08 22:08
leppie30-Oct-08 22:08 
GeneralRe: HELP! SETS Pin
PIEBALDconsult31-Oct-08 5:38
mvePIEBALDconsult31-Oct-08 5:38 
AnswerRe: HELP! SETS Pin
PIEBALDconsult30-Oct-08 5:00
mvePIEBALDconsult30-Oct-08 5:00 
GeneralRe: HELP! SETS Pin
sudany_zool30-Oct-08 16:14
sudany_zool30-Oct-08 16:14 
QuestionHow to send email programmatically... Pin
BlrBoy29-Oct-08 21:26
BlrBoy29-Oct-08 21:26 
AnswerRe: How to send email programmatically... Pin
Christian Graus29-Oct-08 21:53
protectorChristian Graus29-Oct-08 21:53 
GeneralRe: How to send email programmatically... Pin
jas0n231-Nov-08 12:06
jas0n231-Nov-08 12:06 
QuestionComPort Library Pin
DotNetCoderJunior29-Oct-08 21:08
DotNetCoderJunior29-Oct-08 21:08 
AnswerRe: ComPort Library Pin
Mbah Dhaim29-Oct-08 22:08
Mbah Dhaim29-Oct-08 22:08 
GeneralRe: ComPort Library Pin
DotNetCoderJunior29-Oct-08 22:15
DotNetCoderJunior29-Oct-08 22:15 

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.