Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Newcomers DBPro Corner / Input from user problem

Author
Message
Geoff
17
Years of Service
User Offline
Joined: 10th Jul 2007
Location: Sheffield (U.K.)
Posted: 7th Jul 2009 12:48
Hi, I am trying to create a Blackjack card game. I have previously done this o.k. in Visual Basic 6. But with my DBpro attempt I am having a problem in getting information from the user (deal, hit, stand, etc.)
So far I have experimented with Input and Inkey$(), but with no luck.
Am I on the right lines, or am I missing the best method?
Thank you, Geoff.
HowDo
21
Years of Service
User Offline
Joined: 28th Nov 2002
Location: United Kingdom
Posted: 7th Jul 2009 13:11
try looking up Return String=ENTRY$(Auto Backspace Mode) you my find that works the best, there are a few code snippets on the forum showing how to use it.

Dark Physics makes any hot drink go cold.
Dream And Death
18
Years of Service
User Offline
Joined: 21st Feb 2006
Location: The circus! Juggling job, kids and DBPro
Posted: 7th Jul 2009 23:34
Actually I think Keystate(value) may be what Geoff is looking for. Assuming you are giving people the opportunity to (D)eal, (H)it, (S)tand etc, you can check the keystate of D,H and S during your loop. There have been several keyboard maps posted by people on the forum - they're easy to find.
Entry$() is to return a string from the user, e.g. their name for a high score table.

"You get what everyone gets, you get a lifetime!" - Death, The Sandman Library

First you Dream, then you ... - Neil Gaiman, 2001
Geoff
17
Years of Service
User Offline
Joined: 10th Jul 2007
Location: Sheffield (U.K.)
Posted: 7th Jul 2009 23:46
Thanks a lot for your help. Geoff.

Login to post a reply

Server time is: 2024-11-24 03:36:14
Your offset time is: 2024-11-24 03:36:14