Re: Keypress

Tech-Archive recommends: Speed Up your PC by fixing your registry

From: Neil Fallon (nfallo_at_comcast.net)
Date: 04/08/04


Date: Thu, 08 Apr 2004 15:50:09 GMT

Hi Rick,

I read Mike's post and interpreted it to mean that he wanted to try to enter
digits or periods just as he had specified. I don't have to defend a post
that gives him exactly what he wanted to do without any extras. When
someone gives you a specification you don't change the specification that
the person gave because you think that someone might really want to do
something else without asking the person if they wanted something different
than the original request.

Many times I have gotten a lot of help from you and others in this forum but
have always had to dissect what I needed from the posts because some of you
tend to go overboard with your coding just to show off. Sometimes a simple
example will let a person go a long way with what they want to do.

Neil

"Rick Rothstein" <rickNOSPAMnews@NOSPAMcomcast.net> wrote in message
news:e3TXE2XHEHA.3700@TK2MSFTNGP09.phx.gbl...
> 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
> > >
> > >
> >
> >
>
>



Relevant Pages

  • Re: Cohens paper on byte order
    ... >> AND the direction from which one is reading, ... > If one doesn't assume an implicitly given endian-ness ... you feed it a string of digits. ... Note whether the number is little-endian or big-endian. ...
    (sci.crypt)
  • Re: Keypress
    ... I'm afraid you are not reading into the request far enough. ... say he was looking for floating point number entries and not some random ... combination of digits and dots. ...
    (microsoft.public.vb.general.discussion)
  • Re: Cohens paper on byte order
    ... > numbers in computer memory. ... As I said previously, the endian issue ... of reading a number and that is defacto big-endian. ... in the sequence of digits representing a number. ...
    (sci.crypt)
  • Re: location of popup helpers question
    ... On Monday 28 September 2009 22:21:48 Rick Stevens wrote: ... AIUI, reading a file is an access - in fact if you open a text file anywhere ... A big message number (5 or 6 digits) would take a while ...
    (Fedora)
  • Read a file, knowing only a part of its name
    ... I need to open a file for reading, but I only know part of it's name. ... The file I want to read is in the format of xxx-yyyy-zzz.EXT ... The last three digits of the file name are different on each pc, ... It works, but it seems like extra work, plus depending on the number of ...
    (microsoft.public.dotnet.languages.vb)