Re: Keypress
From: Rick Rothstein (rickNOSPAMnews_at_NOSPAMcomcast.net)
Date: 04/08/04
- Next message: YYZ: "Re: Calling DLL functions from an OCX in the same project group"
- Previous message: sen: "Re: [?]Report LstVw w/ Images"
- In reply to: Neil Fallon: "Re: Keypress"
- Next in thread: Bob Butler: "Re: Keypress"
- Reply: Bob Butler: "Re: Keypress"
- Reply: Neil Fallon: "Re: Keypress"
- Messages sorted by: [ date ] [ thread ]
Date: Thu, 8 Apr 2004 11:24:08 -0400
I'm afraid you are not reading into the request far enough. I can't think of
an application where any arbitrary combination of digits and decimal points
would be acceptable (especially if you could corrupt it by pasting in
non-digits and non-decimal points). Also, I think you are being disingenuous
with your defense here since you obviously understood Mike to be asking for
floating point type numbers as your original response suggested a
MaskeEditBox which can't (at least I don't think it can) be configured to
accept the type of entry you are now suggesting the user wanted. Finally,
given Mike's reaction to the code I posted initially, I think we can safely
say he was looking for floating point number entries and not some random
combination of digits and dots.
Rick - MVP
"Neil Fallon" <nfallo@comcast.net> wrote in message
news:wOddc.99687$K91.230799@attbi_s02...
> Read the original post. You're reading things into it. He only wanted to
> allow numbers or decimal point. It was simple question.
>
> Neil
>
> "Björn Holmgren" <bjohol@hotmail.com> wrote in message
> news:I3ddc.36952$zm5.15696@nntpserver.swip.net...
> > "Neil Fallon" <nfallo@comcast.net> wrote in message
> > news:BAcdc.99339$K91.227951@attbi_s02...
> > > The code goes in to the KeyPress event of a textbox if you don't want
to
> > use
> > > a masked edit control. It traps the keys as they are being pressed,
but
> I
> > > suspect you knew that also but just wanted me to explain it to see if
I
> > knew
> > > what I was talking about.
> >
> >
> > If you take some time to really test that, you'll see that the reason
for
> > Rick's question is probably due to the fact that your code just doesn't
> work
> > all that well (no matter where you put it).
> >
> > For one thing, the user can still paste any text into the textbox using
> the
> > context menu. Another problem is that you can type stupid things like
> > "123.456.789".
> >
> > So, maybe all those lines of code were'nt that "unnecessary" after all,
> and
> > that "simple" task turned out to be a bit more complicated than it may
> have
> > appeared at first glance.
> >
> > --
> > Björn Holmgren
> > Guide Konsult AB
> >
> >
>
>
- Next message: YYZ: "Re: Calling DLL functions from an OCX in the same project group"
- Previous message: sen: "Re: [?]Report LstVw w/ Images"
- In reply to: Neil Fallon: "Re: Keypress"
- Next in thread: Bob Butler: "Re: Keypress"
- Reply: Bob Butler: "Re: Keypress"
- Reply: Neil Fallon: "Re: Keypress"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|