Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8003071
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T16:33:27+00:00 2026-06-04T16:33:27+00:00

I have a winforms sign in in c# that I would like to have

  • 0

I have a winforms sign in in c# that I would like to have it try login after pressing the enter key on the password box.

I have a username textbox, password textbox, and a label for my submit.

I have this for my enter keypress.

    private void password_KeyPress(object sender, KeyPressEventArgs e)
    {
        if (e.KeyChar == (char)13)
        {

            signinbutton.Click();    //I was thinking something like this would work                        
        }
    }

Any ideas would be appreciated thanks.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-04T16:33:28+00:00Added an answer on June 4, 2026 at 4:33 pm

    I presume your code currently looks like this:

    private void password_KeyPress(object sender, KeyPressEventArgs e)
    {
        if (e.KeyChar == (char)13)
        {
             // what do i do here?         
        }
    }
    private void signinbutton_Click(object sender, EventArgs e) 
    {
        //do stuff
        //do stuff
        //do stuff
    }
    

    Here is what I recommend you do:

    private void password_KeyPress(object sender, KeyPressEventArgs e)
    {
        if (e.KeyChar == (char)13)
        {
             DoStuff();
        }
    }
    private void signinbutton_Click(object sender, EventArgs e) 
    {
        DoStuff();
    }
    private void DoStuff() {
        //do stuff
        //do stuff
        //do stuff
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a WinForms app which I have compiled to DLL. I would like
I have a have Winforms client that uses Web services on a IIS7 (W2008)
Is this possible? We have WinForms (CF) apps which use the EMDK, and would
I have a Winforms application (written in C#) that is deployed on a network
I have a winforms app that initially displays a window with two file dialog
I have a winforms application and I am trying to create a method that
I have a winforms Application, On Close button click, I am hiding that application
I have a WinForms application, with login form, and I want to store the
I have an existing library (not a Winforms application) that supplies some Winforms to
WinForms have those three boxes in the upper right hand corner that minimize, maximize,

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.