Click here to Skip to main content
15,897,187 members
Home / Discussions / C#
   

C#

 
GeneralRe: how to get fields tables of an acces db into a list box?` Pin
fathatsme6-Aug-09 23:36
fathatsme6-Aug-09 23:36 
QuestionDataGridView Pin
vhassan6-Aug-09 18:26
vhassan6-Aug-09 18:26 
AnswerRe: DataGridView Pin
Mycroft Holmes6-Aug-09 20:14
professionalMycroft Holmes6-Aug-09 20:14 
Questionon enter fire button Pin
Rajee Maharjan6-Aug-09 18:26
Rajee Maharjan6-Aug-09 18:26 
AnswerRe: on enter fire button Pin
MumbleB6-Aug-09 19:19
MumbleB6-Aug-09 19:19 
AnswerRe: on enter fire button Pin
Cracked-Down6-Aug-09 19:21
Cracked-Down6-Aug-09 19:21 
AnswerRe: on enter fire button Pin
Rajee Maharjan6-Aug-09 19:51
Rajee Maharjan6-Aug-09 19:51 
AnswerRe: on enter fire button Pin
DaveyM696-Aug-09 21:29
professionalDaveyM696-Aug-09 21:29 
In that case, something in your code or another control is consuming the first Enter, as it should just work with one press. Without seeing the code it's impossible to diagnose what's causing the problem.

This works for me.
using System;
using System.Drawing;
using System.Windows.Forms;

public partial class FormLogIn : Form
{
    TextBox textBoxUserName;
    TextBox textBoxPassword;
    Button buttonLogIn;

    public FormLogIn()
    {
        InitializeComponent();
        SuspendLayout();

        // textBoxUserName
        textBoxUserName = new TextBox();
        textBoxUserName.Location = new Point(12, 12);

        // textBoxPassword
        textBoxPassword = new TextBox();
        textBoxPassword.Location = new Point(12, 38);
        textBoxPassword.UseSystemPasswordChar = true;

        // buttonLogIn
        buttonLogIn = new Button();
        buttonLogIn.Text = "Log In";
        buttonLogIn.Location = new Point(12, 64);
        buttonLogIn.Click += buttonLogIn_Click;

        // this
        MinimizeBox = false;
        MaximizeBox = false;
        FormBorderStyle = FormBorderStyle.FixedSingle;
        StartPosition = FormStartPosition.CenterScreen;
        Size = new Size(132, 132);
        Text = "Log In";
        AcceptButton = buttonLogIn;
        Controls.AddRange(new Control[] { textBoxUserName, textBoxPassword, buttonLogIn });

        ResumeLayout(false);
    }

    void buttonLogIn_Click(object sender, EventArgs e)
    {
        // Validate credentials etc

        Close();
    }
}


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)
Why are you using VB6? Do you hate yourself? (Christian Graus)

QuestionHow to save the property of the user-defined column ? Pin
mctramp1686-Aug-09 17:39
mctramp1686-Aug-09 17:39 
AnswerRe: How to save the property of the user-defined column ? Pin
N a v a n e e t h6-Aug-09 18:07
N a v a n e e t h6-Aug-09 18:07 
Questionworking with webservices in .net Pin
prasadbuddhika6-Aug-09 17:12
prasadbuddhika6-Aug-09 17:12 
AnswerRe: working with webservices in .net Pin
N a v a n e e t h6-Aug-09 17:47
N a v a n e e t h6-Aug-09 17:47 
GeneralRe: working with webservices in .net Pin
prasadbuddhika6-Aug-09 19:27
prasadbuddhika6-Aug-09 19:27 
GeneralRe: working with webservices in .net Pin
N a v a n e e t h6-Aug-09 22:26
N a v a n e e t h6-Aug-09 22:26 
QuestionSend SMS /MMS to mobile phone from FTP server Pin
pearllyn6-Aug-09 15:46
pearllyn6-Aug-09 15:46 
AnswerRe: Send SMS /MMS to mobile phone from FTP server Pin
Spacix One6-Aug-09 17:28
Spacix One6-Aug-09 17:28 
AnswerRe: Send SMS /MMS to mobile phone from FTP server Pin
Blue_Boy7-Aug-09 3:41
Blue_Boy7-Aug-09 3:41 
QuestionSaving RSS feed in "utf-8" format. Pin
dbhalla_in6-Aug-09 14:29
dbhalla_in6-Aug-09 14:29 
AnswerRe: Saving RSS feed in "utf-8" format. Pin
Luc Pattyn6-Aug-09 14:45
sitebuilderLuc Pattyn6-Aug-09 14:45 
QuestionRelative URLs in Code-Behind Pin
Colin Pace6-Aug-09 10:52
Colin Pace6-Aug-09 10:52 
AnswerRe: Relative URLs in Code-Behind Pin
Adam R Harris6-Aug-09 11:07
Adam R Harris6-Aug-09 11:07 
QuestionC# Dataset bind to DataGridView update tabel in SQL Server 2005 DB Pin
Wheels0126-Aug-09 9:42
Wheels0126-Aug-09 9:42 
AnswerRe: C# Dataset bind to DataGridView update tabel in SQL Server 2005 DB Pin
Adam R Harris6-Aug-09 9:58
Adam R Harris6-Aug-09 9:58 
AnswerRe: C# Dataset bind to DataGridView update tabel in SQL Server 2005 DB Pin
Wheels01210-Aug-09 7:10
Wheels01210-Aug-09 7:10 
Question"Screenshot" from handle? Pin
dandy726-Aug-09 9:33
dandy726-Aug-09 9:33 

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.