PC Review


Reply
Thread Tools Rate Thread

bug !!bug !! on windows synchronization!!

 
 
phoebe
Guest
Posts: n/a
 
      9th Aug 2003
hi all, I have some problem on a Windows application in .Net Framework,just
as below:
private void button1_Click(object sender, System.EventArgs e)
{

WindowsApplication1.localhost.Service1 ser=new
WindowsApplication1.localhost.Service1();
textBox1.Text=ser.Add(int.Parse(textBox1.Text),1).ToString();
MessageBox.Show("ok");

}
you know, A webservice named ser is called in the above function,and ,when
the main form is loaded for the first time,if I click the button1 on the
form very quickly,the awful thing would happen:a messagebox is showed,when I
close it ,another messagebox is opened,I continue closing, and the same
thing happen:a messagebox is showed.The number of messageboxes is according
to the speed of my mouse clicking.

so, it seems the button1 still accept the click event while a webservice is
being called for the first time.But I expect only one messagebox would be
showed even though I click very quickly.How to control? hope your help!!!
Thank you!



 
Reply With Quote
 
 
 
 
John Saunders
Guest
Posts: n/a
 
      9th Aug 2003
"phoebe" <(E-Mail Removed)> wrote in message
news:%(E-Mail Removed)...
> hi all, I have some problem on a Windows application in .Net

Framework,just
> as below:
> private void button1_Click(object sender, System.EventArgs e)
> {

....
> }

....
> so, it seems the button1 still accept the click event while a webservice

is
> being called for the first time.


When a button is clicked, it raises a Click event. your button1_Click method
handles that event. Naturally, when you click the button multiple times,
button1_Click is called multiple times.

In order to answer your question, you have to ask yourself, "why would it
_not_ raise the Click event? What would prevent it?"

> But I expect only one messagebox would be
> showed even though I click very quickly.


Why did you expect that would happen? It happened the first time, didn't it?
And you didn't do anything to prevent it, did you?
--
John Saunders
Internet Engineer
(E-Mail Removed)


 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Using Windows Synchronization AJK Windows XP Networking 0 10th Oct 2008 03:15 PM
Windows XP Synchronization =?Utf-8?B?QUpL?= Windows XP Work Remotely 1 2nd Oct 2006 11:33 PM
Windows XP Windows XP change time synchronization frequency Mike Windows XP General 1 2nd Jan 2004 09:46 AM
bug !!bug !! on windows synchronization!! phoebe Microsoft C# .NET 3 9th Aug 2003 03:54 PM
bug !!bug !! on windows synchronization!! phoebe Microsoft C# .NET 0 9th Aug 2003 05:09 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 12:44 PM.