Board index » delphi » Form Close - Getting Bell

Form Close - Getting Bell

Hello,

I have a couple of forms that are used to collect data from a user (such as
password) and on the keydown event, I capture the enter key and
close/destroy the form.  However, I keep getting a beep and there is a
noticable delay.  I show the form modally, has this something to do with it?

Thanks,

Lee

--
Like Rock?  My best friend's band cut their first CD.
Check out two songs at: www.datatrakpos.com/leftover.htm

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.380 / Virus Database: 213 - Release Date: 7/24/2002

 

Re:Form Close - Getting Bell


Quote
Lee Jenkins wrote in message ...
>I have a couple of forms that are used to collect data from a user (such
as
>password) and on the keydown event, I capture the enter key and
>close/destroy the form.  However, I keep getting a beep and there is a
>noticable delay.  I show the form modally, has this something to do with

it?

TButton.Default
TButton.Cancel
TForm.ModalResult

You know what comes next, don't you?

Groetjes,
Maarten Wiltink

Re:Form Close - Getting Bell


Change it to:

if key=#13 then key:=#0;

That will remove the beep.

Cheers,
Nick

Quote
"Lee Jenkins" <lee_jenkin...@datatrakpos.com> wrote in message

news:N0g19.711714$cQ3.110673@sccrnsc01...
Quote

> Hello,

> I have a couple of forms that are used to collect data from a user (such
as
> password) and on the keydown event, I capture the enter key and
> close/destroy the form.  However, I keep getting a beep and there is a
> noticable delay.  I show the form modally, has this something to do with
it?

> Thanks,

> Lee

> --
> Like Rock?  My best friend's band cut their first CD.
> Check out two songs at: www.datatrakpos.com/leftover.htm

> ---
> Outgoing mail is certified Virus Free.
> Checked by AVG anti-virus system (http://www.grisoft.com).
> Version: 6.0.380 / Virus Database: 213 - Release Date: 7/24/2002

Re:Form Close - Getting Bell


Nick,

I tried setting Key := 0;

But that didn't help.

Thanks,
Lee

--
Like Rock?  My best friend's band cut their first CD.
Check out two songs at: www.datatrakpos.com/leftover.htm

Quote
"Nicholas Sherlock" <n_sherl...@hotmail.com> wrote in message

news:ai4687$lgp$1@lust.ihug.co.nz...

Quote
> Change it to:

> if key=#13 then key:=#0;

> That will remove the beep.

> Cheers,
> Nick
> "Lee Jenkins" <lee_jenkin...@datatrakpos.com> wrote in message
> news:N0g19.711714$cQ3.110673@sccrnsc01...

> > Hello,

> > I have a couple of forms that are used to collect data from a user (such
> as
> > password) and on the keydown event, I capture the enter key and
> > close/destroy the form.  However, I keep getting a beep and there is a
> > noticable delay.  I show the form modally, has this something to do with
> it?

> > Thanks,

> > Lee

> > --
> > Like Rock?  My best friend's band cut their first CD.
> > Check out two songs at: www.datatrakpos.com/leftover.htm

> > ---
> > Outgoing mail is certified Virus Free.
> > Checked by AVG anti-virus system (http://www.grisoft.com).
> > Version: 6.0.380 / Virus Database: 213 - Release Date: 7/24/2002

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.380 / Virus Database: 213 - Release Date: 7/24/2002

Re:Form Close - Getting Bell


Sorry, I don't.  I'll look again in Google.

BTW, what's in my pocketses?

Lee

--
Like Rock?  My best friend's band cut their first CD.
Check out two songs at: www.datatrakpos.com/leftover.htm

Quote
"Maarten Wiltink" <maar...@kittensandcats.net> wrote in message

news:ai467a$7rc$1@news1.xs4all.nl...

Quote
> Lee Jenkins wrote in message ...
> >I have a couple of forms that are used to collect data from a user (such
> as
> >password) and on the keydown event, I capture the enter key and
> >close/destroy the form.  However, I keep getting a beep and there is a
> >noticable delay.  I show the form modally, has this something to do with
> it?

> TButton.Default
> TButton.Cancel
> TForm.ModalResult

> You know what comes next, don't you?

> Groetjes,
> Maarten Wiltink

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.380 / Virus Database: 213 - Release Date: 7/24/2002

Re:Form Close - Getting Bell


F1

Re:Form Close - Getting Bell


Quote
"Lee Jenkins" <lee_jenkin...@datatrakpos.com> wrote in message

news:2Nk19.692564$352.148580@sccrnsc02...

Quote
> Nick,

> I tried setting Key := 0;

> But that didn't help.

If you examine the post carefully you will see that the suggestion is Key :=
#10. The #10 is a character type, which indicates that the assignment should
be done in the onKeyPress. From your response I presume that you are using
onKeyDown and/or onKeyUp. What was suggest does work and will resolve the
bell problem. However, IMO, Maarten's suggestion is far better.

Re:Form Close - Getting Bell


OK, got it.

Thanks,

Lee

--
Like Rock?  My best friend's band cut their first CD.
Check out two songs at: www.datatrakpos.com/leftover.htm

Quote
"Maarten Wiltink" <maar...@kittensandcats.net> wrote in message

news:ai467a$7rc$1@news1.xs4all.nl...

Quote
> Lee Jenkins wrote in message ...
> >I have a couple of forms that are used to collect data from a user (such
> as
> >password) and on the keydown event, I capture the enter key and
> >close/destroy the form.  However, I keep getting a beep and there is a
> >noticable delay.  I show the form modally, has this something to do with
> it?

> TButton.Default
> TButton.Cancel
> TForm.ModalResult

> You know what comes next, don't you?

> Groetjes,
> Maarten Wiltink

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.380 / Virus Database: 213 - Release Date: 7/24/2002

Re:Form Close - Getting Bell


Yeah,

I finally caught that.

Thanks, Bruce. U2 Maartin.

Lee

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.380 / Virus Database: 213 - Release Date: 7/24/2002

Re:Form Close - Getting Bell


LOL

--
Like Rock?  My best friend's band cut their first CD.
Check out two songs at: www.datatrakpos.com/leftover.htm

Quote
"Bruce Roberts" <b...@bounceitattcanada.xnet> wrote in message

news:xcn19.7412$H67.39399@tor-nn1.netcom.ca...

Quote
> F1

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.380 / Virus Database: 213 - Release Date: 7/24/2002

Re:Form Close - Getting Bell


Quote
Lee Jenkins wrote in message ...
>Yeah,

>I finally caught that.

>Thanks, Bruce. U2 Maartin.

You're welcome, Lie (ducks).

Groetjes,
Maarten Wiltink

Re:Form Close - Getting Bell


My apologies, MaartEn!

Lee

--
Like Rock?  My best friend's band cut their first CD.
Check out two songs at: www.datatrakpos.com/leftover.htm

Quote
"Maarten Wiltink" <maar...@kittensandcats.net> wrote in message

news:ai6j3j$pfr$1@news1.xs4all.nl...

Quote
> Lee Jenkins wrote in message ...
> >Yeah,

> >I finally caught that.

> >Thanks, Bruce. U2 Maartin.

> You're welcome, Lie (ducks).

> Groetjes,
> Maarten Wiltink

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.380 / Virus Database: 213 - Release Date: 7/24/2002

Other Threads