Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsVB SyntaxEnterprise DevelopmentDatabase AccessControlsCOMWin APICrystal ReportDeploymentGeneralGeneral 2
Related Topics
VB.NET / ASP.NETMS SQL ServerMS AccessOther Database ProductsMore Topics ...

VB Forum / General / July 2004



Tip: Looking for answers? Try searching our database.

Disable typomatic?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Top Spin - 30 Jul 2004 13:24 GMT
Is there any way to disable the typomatic function for a selected key?

Actually, I want to toggle it on and off.

I am writing an electronic flashcard program where the user scores
themselves. I have it set up so that the program displayes the
question then waits for the user to click on the Show Answer button.
That key has the focus so that pressing the Enter key will activate
that button.

The user then clicks on either the Correct or Incorrect buttons. The
Correct key also has the focus so that the Enter key activates that
key, as well.

The problem is that if the user does not release the Enter key before
the typomatic function kicks in, the program will rapidly present
questions and score them as correct.

I could also solve the problem by making a different key activate each
function, but I am trying to make it easy to use without moving around
on the keyboard and preferably with only one hand.

Suggestions appreciated.

Thanks

Signature

Running MS VB 6.0 Pro (SP5) on Win2K-SR2
For email, use Usenet-20031220 at spamex.com

Patty O'Dors - 30 Jul 2004 13:45 GMT
Make it so that instead of pressing Enter for correct, they have to press Y or N.
And Y or N doesn't activate the Show Answer button.

You're still being miles kinder to them than forcing them to use the mouse.
Jan Hyde - 30 Jul 2004 14:43 GMT
Patty O'Dors <PattyODors@discussions.microsoft.com>'s wild
thoughts were released on Fri, 30 Jul 2004 05:45:03 -0700
bearing the following fruit:

>Make it so that instead of pressing Enter for correct, they have to press Y or N.
>And Y or N doesn't activate the Show Answer button.
>
>You're still being miles kinder to them than forcing them to use the mouse.

Besides which, messing around with focus/default buttons
confuses the hell out of this keyboard user.

Jan Hyde (VB MVP)

Signature

Tangent: A sunburned man. (Pierre Abbat)

[Abolish the TV License - http://www.tvlicensing.biz/]

Bob Butler - 30 Jul 2004 14:35 GMT
<cut>
> The problem is that if the user does not release the Enter key before
> the typomatic function kicks in, the program will rapidly present
> questions and score them as correct.

My first thought would be to set the form's KeyPreview to True and use the
KeyDown and KeyUp events to set a flag that the button Click events can
check

Signature

Reply to the group so all can participate
VB.Net... just say "No"

Rick Rothstein - 30 Jul 2004 14:47 GMT
> Is there any way to disable the typomatic function for a selected key?
>
[quoted text clipped - 19 lines]
>
> Suggestions appreciated.

I'm not sure how you have this implemented so that both keys get
activated, but I'm not that concerned with it for now. Instead, I'll
ask... Why does your user get to score the answer as correct or
incorrect? When your user clicks or presses Enter on the Show Answer
button, you should have code in that event that also determines if the
answer was correct or not and score it for the user automatically. In
your current structure, what stops a user from "lying" by pressing the
Correct button all the time?

Rick - MVP
Top Spin - 30 Jul 2004 15:19 GMT
>> Is there any way to disable the typomatic function for a selected key?
>>
[quoted text clipped - 28 lines]
>your current structure, what stops a user from "lying" by pressing the
>Correct button all the time?

It's self scoring because the code to score it is way beyond my
skills.

Here's a deal. I'll provide you with a database of questions and
answers. For example, the 1,000 cards in the original Trivial Pursuit
game. You write the code to determine if the answer entered by the
user to any of the questions is right or wrong. I'll pay you well for
the exclusive use of that code.

Sample:  What are boxcars?
Answer on Card: Double sixes on a dice roll.

Just a few of the possible correct answers:

double sixes
double six's
two sixes
six and six
six & six
6-6
two 6's
6 on each die
6 on each dice (sic)
...ad infinitum

;-)

But then, that was not the question.

Signature

Running MS VB 6.0 Pro (SP5) on Win2K-SR2
For email, use Usenet-20031220 at spamex.com

Larry Serflaten - 30 Jul 2004 16:35 GMT
"Top Spin" <ToppSpin@hotmail.com> wrote

> Here's a deal. I'll provide you with a database of questions and
> answers. For example, the 1,000 cards in the original Trivial Pursuit
> game. You write the code to determine if the answer entered by the
> user to any of the questions is right or wrong. I'll pay you well for
> the exclusive use of that code.

The typical way to get around this is to provide the user with a selection
of possible anwers they can choose from (also stored in the DB).  When
the user makes a selection you can then compare that with what the right
selection should be.

LFS
Jan Hyde - 30 Jul 2004 16:57 GMT
"Larry Serflaten" <serflaten@usinternet.com>'s wild thoughts
were released on Fri, 30 Jul 2004 10:35:12 -0500 bearing the
following fruit:

>"Top Spin" <ToppSpin@hotmail.com> wrote
>
[quoted text clipped - 8 lines]
>the user makes a selection you can then compare that with what the right
>selection should be.

That's a lot of work and would ruin a game of TP

I have a copy of TP that you can choose to play with multi
choice answers, it makes the game considerably easier.

Jan Hyde (VB MVP)

Signature

The doctor fell in the well and broke his collarbone.
Which proves that doctors should tend the sick and leave the well alone.

[Abolish the TV License - http://www.tvlicensing.biz/]

Larry Serflaten - 30 Jul 2004 17:53 GMT
> That's a lot of work and would ruin a game of TP
>
> I have a copy of TP that you can choose to play with multi
> choice answers, it makes the game considerably easier.

See my other reply, it too would be work, but for the short type
of answers in the game, could be made to work....

I forgot to add the dice in the answers string:

40 - 2 two double | 40 - 6 6's six sixes | 20 - die dice

<g>
LFS
Top Spin - 30 Jul 2004 17:09 GMT
>"Top Spin" <ToppSpin@hotmail.com> wrote
>
[quoted text clipped - 8 lines]
>the user makes a selection you can then compare that with what the right
>selection should be.

Yes, that's another way to go, but it is a completely different type
of drill. It's not what we are doing.

Signature

Running MS VB 6.0 Pro (SP5) on Win2K-SR2
For email, use Usenet-20031220 at spamex.com

Bob Butler - 30 Jul 2004 17:26 GMT
Try this... start a new project and add 2 checkboxes; set the Style property
to Graphical for both of them (which makes them look like command buttons).
Paste in this code and watch the immediate window as you run it.

Private Sub Check1_Click()
If Check1.Value = vbChecked Then
 Debug.Print "correct"
 Check1.Value = vbUnchecked
End If
End Sub

Private Sub Check1_KeyUp(KeyCode As Integer, Shift As Integer)
If KeyCode = 13 Then Check1.Value = vbChecked
End Sub

Private Sub Check2_Click()
If Check2.Value = vbChecked Then
 Debug.Print "incorrect"
 Check2.Value = vbUnchecked
End If
End Sub

Private Sub Check2_KeyUp(KeyCode As Integer, Shift As Integer)
If KeyCode = 13 Then Check2.Value = vbChecked
End Sub

Private Sub Form_Load()
Check1.Caption = "&Correct"
'Check1.Style = vbButtonGraphical
Check2.Caption = "&Incorrect"
'Check2.Style = vbButtonGraphical
End Sub

Signature

Reply to the group so all can participate
VB.Net... just say "No"

Larry Serflaten - 30 Jul 2004 17:44 GMT
"Top Spin" <ToppSpin@hotmail.com> wrote

> >The typical way to get around this is to provide the user with a selection
> >of possible anwers they can choose from (also stored in the DB).  When
[quoted text clipped - 3 lines]
> Yes, that's another way to go, but it is a completely different type
> of drill. It's not what we are doing.

You did not say what type of drill it was for.  Your original example was
Trivial Pursuit and that could be multiple choice, and a drill for fun.

If it were a requirement to parse the user answer for correctness, and
the user's score mattered in some tangable (real world) way, (Like a
written driver's test) then I would set up the questions so that short
answers are possible (but not required).

You could then include a string of words to look for in the user's
answer, and give the user points for having included those words.
Each question would have its associated answers list, and you could
set a cutoff value for how many points are required for the user to
get credited as being correct.

For your boxcars example:

40 - 2 two double | 40 - 6 6's six sixes

if you find any one of the first group (2, two double)  you award 40 points,
if you find any one of the second group, you award another 40 points.

Now the user answers "2 sixes" so you parse the answer out and compare
the users list of words, with the answer list.  

The user gets a point value of 80.  If you set your cutoff at 60 points, you
report to the user they credit for the answer because their anwser contained
(and repeat the words you found "2 sixes").  If the user falls short, you should also
add a place for the user to contest the results, for them to give a reason why
their anwer is correct.  If it really matters that they pass, you don't want them
marking their own scores, and if it really matters, someone should be checking
the results, and in this case they can limit themselves to reading the contested
questions and answers and decide if the user should get credit.

But, if you are willing to let the user choose their own score, I can't imagine
the test results matter in any real way.....

LFS  
Rick Rothstein - 30 Jul 2004 16:43 GMT
> It's self scoring because the code to score
> it is way beyond my skills.

From the description of what you actually wanting, it's probably beyond
my skills too.<g> What threw me was your use of the term "electronic
flashcard" which conjures up a multiple-choice senario for some reason.

> .......<snip>.......
> But then, that was not the question.

To address the actual question, I think we would need to see some code
on how you are moving the focus around and which, if any, CommandButtons
have there Default property set to True.

Rick - MVP
Jonathan Wood - 30 Jul 2004 16:58 GMT
Top Spin,

> Here's a deal. I'll provide you with a database of questions and
> answers. For example, the 1,000 cards in the original Trivial Pursuit
[quoted text clipped - 21 lines]
>
> But then, that was not the question.

I'm available for consulting projects.

The Trivial Pursuit I've seen is multiple choice. That would make it much
easier--of course. Otherwise, the database would need to include information
that would give the program information on which answers are acceptable.

Signature

Jonathan Wood
SoftCircuits
http://www.softcircuits.com
Available for consulting: http://www.softcircuits.com/jwood/resume.htm

Top Spin - 30 Jul 2004 17:11 GMT
>Top Spin,
>
[quoted text clipped - 29 lines]
>easier--of course. Otherwise, the database would need to include information
>that would give the program information on which answers are acceptable.

The "original" Trivial Pursuit is not multiple choice -- nor is my
application.

Signature

Running MS VB 6.0 Pro (SP5) on Win2K-SR2
For email, use Usenet-20031220 at spamex.com

Don@home.com - 30 Jul 2004 17:18 GMT
>Top Spin,
>
[quoted text clipped - 5 lines]
>>
>> Sample:  What are boxcars?

A railroad car for moving Hobo's from one area to another... LOL

<snip>
Have a good day...

Don
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.