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

C#

 
GeneralRe: create a changing in pin code number of atm application in c# Pin
Mycroft Holmes17-Sep-08 22:15
professionalMycroft Holmes17-Sep-08 22:15 
GeneralRe: create a changing in pin code number of atm application in c# Pin
PaulPrice18-Sep-08 1:42
PaulPrice18-Sep-08 1:42 
GeneralRe: create a changing in pin code number of atm application in c# Pin
Mycroft Holmes18-Sep-08 2:32
professionalMycroft Holmes18-Sep-08 2:32 
GeneralRe: create a changing in pin code number of atm application in c# Pin
Harvey Saayman18-Sep-08 2:43
Harvey Saayman18-Sep-08 2:43 
GeneralRe: create a changing in pin code number of atm application in c# Pin
Mycroft Holmes18-Sep-08 2:51
professionalMycroft Holmes18-Sep-08 2:51 
GeneralRe: create a changing in pin code number of atm application in c# Pin
Harvey Saayman18-Sep-08 2:53
Harvey Saayman18-Sep-08 2:53 
AnswerGet out of the programming industry!!! Pin
Harvey Saayman18-Sep-08 2:41
Harvey Saayman18-Sep-08 2:41 
AnswerCreate one yourself. This is very easy. [modified] Pin
John M. Drescher18-Sep-08 2:52
John M. Drescher18-Sep-08 2:52 
Questionquery Pin
lankaudaranga17-Sep-08 20:44
lankaudaranga17-Sep-08 20:44 
AnswerRe: query Pin
Blue_Boy17-Sep-08 21:58
Blue_Boy17-Sep-08 21:58 
AnswerRe: query Pin
Mycroft Holmes17-Sep-08 22:03
professionalMycroft Holmes17-Sep-08 22:03 
AnswerRe: query Pin
Harvey Saayman18-Sep-08 2:47
Harvey Saayman18-Sep-08 2:47 
QuestionHot Mail Contacts Pin
nhss17-Sep-08 20:32
nhss17-Sep-08 20:32 
AnswerRe: Hot Mail Contacts Pin
Mycroft Holmes17-Sep-08 22:20
professionalMycroft Holmes17-Sep-08 22:20 
QuestionTcpClient connects very slow [modified] Pin
Mark Snow17-Sep-08 20:20
Mark Snow17-Sep-08 20:20 
AnswerRe: TcpClient connects very slow Pin
leppie17-Sep-08 22:25
leppie17-Sep-08 22:25 
GeneralRe: TcpClient connects very slow Pin
Mark Snow17-Sep-08 22:38
Mark Snow17-Sep-08 22:38 
GeneralRe: TcpClient connects very slow Pin
leppie17-Sep-08 22:49
leppie17-Sep-08 22:49 
GeneralRe: TcpClient connects very slow Pin
Mark Snow17-Sep-08 23:12
Mark Snow17-Sep-08 23:12 
GeneralRe: TcpClient connects very slow Pin
leppie17-Sep-08 23:49
leppie17-Sep-08 23:49 
QuestionAlpha numeric sorting for dataview/datatable Pin
avtar11117-Sep-08 19:27
avtar11117-Sep-08 19:27 
AnswerRe: Alpha numeric sorting for dataview/datatable Pin
Mycroft Holmes17-Sep-08 22:25
professionalMycroft Holmes17-Sep-08 22:25 
QuestionHow to use adapter when returned by the following function Pin
CPK_201117-Sep-08 19:00
CPK_201117-Sep-08 19:00 
AnswerRe: How to use adapter when returned by the following function Pin
N a v a n e e t h17-Sep-08 20:33
N a v a n e e t h17-Sep-08 20:33 
QuestionWindows Form allows click events on disable buttons ? Pin
nvngyl17-Sep-08 18:57
nvngyl17-Sep-08 18:57 
Hi All,

I am facing very strange problem. I have a Windows form and there are two buttons on it. Each has its click event as shown below:

private void button2_Click(object sender, EventArgs e)
{
MessageBox.Show("Button 2 CLICKED");
}

private void button1_Click(object sender, EventArgs e)
{
button2.Enabled = false;
long = 0;
while (i < 999999999)
{
i++;
}
button2.Enabled = true;
}

on the click of button1, i am disabling button2 and then do some processing (loop) and then enable the button2 again.

Problem is that when i click button1, button2 gets disabled and now i click on disabled button button2, wait till it become enable, at the moment it become enable, its click event gets fired and Message "Buuton 2 Clicked" displayed.

How does C# allow events on disabled buttons?
Please let me know, am i doing something wrong?

Confused | :confused:

Naveen

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.