🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.nativeapi
Article #11661

Re: creating an event

#11661
From: Jim Taylor
Date: Wed, 28 Jan 2004 13:56
42 lines
2811 bytes
Alan (and all)

As an intro: I am an old retired guy who taught himself C++; I do this for
fun. I am also an amateur lepidopterist, and I have written a good many
programs I use in connection with my collection. One such program (with some
age on it) pops up relevant data about a critter - range, habitat, food
plants, etc., including a picture.

What I decided to do the other day was add a browse feature. If the bug in
my hand is not quite a match for what the program produces, I wanted the
ability to browse up or down (the collection is arranged in supposedly
evolutionary order.) This was simple to do, but I wrote the old part of the
program to accept "Enter" as a way of beginning the search for the bug in
the spotlight at the time, so after pressing "Browse up" I next must press
"Enter". It works well, but I am wondering if I can press "Enter" with a
line of code.

Were I rewriting the program what I want would be simple. What I want to do
is add a line and eliminate a keystroke. Too, I am curious about how I can
do this; it has never come up before.

If anyone has an answer, I would appreciate it.

Jim Taylor
"Alan Bellingham" <alanb@episys.com> wrote in message
news:olbf10lh2ueh134395g90juvb0gcq33dd4@4ax.com...
> "Jim Taylor" <drivingiron@worldnet.att.net> wrote:
>
> >How can I hit the "Enter" key from within my program? 'Twould save a few
> >keystrokes. Seems simple, but I can't seem to do it.
>
> What happens when you hit the Enter key? Why not directly call the
> relevant function?
>
> Calling a function by pushing something into a keyboard buffer and then
> reading it back does seem a little silly to me.
>
> Alan Bellingham
> --
> Team Mongolian Wok
> <url:http://www.borland.com/newsgroups/> Borland newsgroup descriptions
> <url:http://www.borland.com/newsgroups/netiquette.html>      netiquette
Technical Details
Message-ID: <4017bfa5@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!news.maxwell.syr.edu!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail
References: <4017abaa@newsgroups.borland.com> <olbf10lh2ueh134395g90juvb0gcq33dd4@4ax.com>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 10cc67,d5a41e05e4e195c
X-Google-Attributes: gid10cc67,public
X-Google-ArrivalTime: 2004-01-28 06:10:25 PST
From: "Jim Taylor" <drivingiron@worldnet.att.net>
Newsgroups: borland.public.cppbuilder.nativeapi
References: <4017abaa@newsgroups.borland.com> <olbf10lh2ueh134395g90juvb0gcq33dd4@4ax.com>
Subject: Re: creating an event
Date: Wed, 28 Jan 2004 08:56:51 -0500
Lines: 44
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1106
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106
NNTP-Posting-Host: 12.77.201.165
Message-ID: <4017bfa5@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1075298213 12.77.201.165 (28 Jan 2004 05:56:53 -0700)
Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!news.maxwell.syr.edu!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail