Click here to Skip to main content
15,922,584 members
Home / Discussions / C#
   

C#

 
GeneralRe: i install net frameworksdk Pin
imran_rafique10-Aug-02 10:34
imran_rafique10-Aug-02 10:34 
GeneralRe: i install net frameworksdk Pin
imran_rafique10-Aug-02 11:09
imran_rafique10-Aug-02 11:09 
GeneralRe: i install net frameworksdk Pin
leppie10-Aug-02 11:22
leppie10-Aug-02 11:22 
Questionhow to click a button Pin
imran_rafique9-Aug-02 21:02
imran_rafique9-Aug-02 21:02 
Questionhow to click a button Pin
imran_rafique9-Aug-02 10:47
imran_rafique9-Aug-02 10:47 
AnswerRe: how to click a button Pin
Nick Parker9-Aug-02 10:52
protectorNick Parker9-Aug-02 10:52 
GeneralRe: how to click a button Pin
Rama Krishna Vavilala9-Aug-02 12:07
Rama Krishna Vavilala9-Aug-02 12:07 
GeneralRe: how to click a button Pin
Nick Parker9-Aug-02 13:51
protectorNick Parker9-Aug-02 13:51 
Rama Krishna wrote:
Nope, that's not correct? What if there are several event liseteners? You have to use PerformClick method.

There maybe other methods to do this other than the way that I described above however the follow below does work.
private void cmdSearch_Click(object sender, System.EventArgs e)
{
    if(txtSearch.Text == "")
    {
        MessageBox.Show("Please enter a value to search on");
    }
    else
    {

    }
}

private void txtSearch_KeyPress(object sender, System.Windows.Forms.KeyPressEventArgs e)
{
    if(e.KeyChar == 13)
    {
        cmdSearch_Click(sender, e);
    }
}

I see that the PerformClick creates a click event, but if there are several listeners as you say you would still need a method to differentiate the target. I'm assuming this can be accomplished through either overriding the WndProc or through the usage of a delagate. What do you think, or did I misunderstand what you meant about listeners?

Nick Parker


GeneralRe: how to click a button Pin
Rama Krishna Vavilala9-Aug-02 15:36
Rama Krishna Vavilala9-Aug-02 15:36 
GeneralRe: how to click a button Pin
Nick Parker9-Aug-02 16:31
protectorNick Parker9-Aug-02 16:31 
GeneralRe: how to click a button Pin
James T. Johnson9-Aug-02 17:00
James T. Johnson9-Aug-02 17:00 
GeneralRe: how to click a button Pin
Nick Parker9-Aug-02 17:24
protectorNick Parker9-Aug-02 17:24 
GeneralRe: how to click a button Pin
James T. Johnson9-Aug-02 18:32
James T. Johnson9-Aug-02 18:32 
GeneralRe: how to click a button Pin
Nick Parker9-Aug-02 18:39
protectorNick Parker9-Aug-02 18:39 
AnswerRe: how to click a button Pin
Rama Krishna Vavilala9-Aug-02 12:06
Rama Krishna Vavilala9-Aug-02 12:06 
GeneralControlling the Mouse pointer Pin
albean9-Aug-02 9:42
albean9-Aug-02 9:42 
GeneralRe: Controlling the Mouse pointer Pin
Nick Parker9-Aug-02 10:57
protectorNick Parker9-Aug-02 10:57 
GeneralRe: Controlling the Mouse pointer Pin
albean9-Aug-02 11:12
albean9-Aug-02 11:12 
GeneralRe: Controlling the Mouse pointer Pin
Nick Parker9-Aug-02 11:17
protectorNick Parker9-Aug-02 11:17 
GeneralRe: Controlling the Mouse pointer Pin
imran_rafique13-Aug-02 9:50
imran_rafique13-Aug-02 9:50 
GeneralRe: Controlling the Mouse pointer Pin
Nick Parker13-Aug-02 9:54
protectorNick Parker13-Aug-02 9:54 
GeneralRe: Controlling the Mouse pointer Pin
imran_rafique13-Aug-02 10:13
imran_rafique13-Aug-02 10:13 
GeneralRe: Controlling the Mouse pointer Pin
Nick Parker13-Aug-02 10:59
protectorNick Parker13-Aug-02 10:59 
QuestionTransparent color? Pin
Rickard Andersson209-Aug-02 6:12
Rickard Andersson209-Aug-02 6:12 
AnswerRe: Transparent color? Pin
Anonymous9-Aug-02 7:06
Anonymous9-Aug-02 7: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.