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/text size question

Author
Message
cguy
16
Years of Service
User Offline
Joined: 3rd Nov 2007
Location: In my Computer!
Posted: 2nd Mar 2009 03:51
A pretty simple code:
[/quote]do
input input_string$
if returnkey() then cls
loop[quote]
I wanted to make an input that automatically clears after you press enter. Why is it that when you add in the third line, the text becomes large and distorted?
Would you just have to use the SET DISPLAY MODE command to fix this?
Quirkyjim
15
Years of Service
User Offline
Joined: 18th Oct 2008
Location: At my computer
Posted: 3rd Mar 2009 01:26
Just do this:


Input is what's known as a "blocking" command, which means that DBPro stops everything else that it's doing to focus on this one command, input. So, you don't need

just go straight to
right after the input command.

~QJ
cguy
16
Years of Service
User Offline
Joined: 3rd Nov 2007
Location: In my Computer!
Posted: 3rd Mar 2009 06:31
I seem to remember trying that as my first code but something went wrong, then I tried to over complicate it. I do remember reading that INPUT was a "blocking" code, but didn't know what it mean't. I guess I learned the hard way!
Thanks a lot.
cguy
16
Years of Service
User Offline
Joined: 3rd Nov 2007
Location: In my Computer!
Posted: 8th Mar 2009 20:40
Does the fact that it is a blocking command keep you from using something like this, because it skrews up!

This would be nice for converting uppercase strings to lowercase!
BMacZero
18
Years of Service
User Offline
Joined: 30th Dec 2005
Location: E:/ NA / USA
Posted: 8th Mar 2009 22:37
No, that should still work. It would go like this:


Program waits for input from user.

After it gets the input, program takes the input, lowercases it, and stores it in another variable.

Program loops.



cguy
16
Years of Service
User Offline
Joined: 3rd Nov 2007
Location: In my Computer!
Posted: 9th Mar 2009 03:01
Yes, I understand. Technically the program would work, but if you try it, the text becomes distorted and sequences of lines apear under you text.
BMacZero
18
Years of Service
User Offline
Joined: 30th Dec 2005
Location: E:/ NA / USA
Posted: 9th Mar 2009 04:22
Well I know the lines are because the input function produces a flashing _ where the user's input goes, and if you have the backdrop off it can end up staying behind printed on the screen. Not sure why it might get distorted though.



cguy
16
Years of Service
User Offline
Joined: 3rd Nov 2007
Location: In my Computer!
Posted: 9th Mar 2009 04:45 Edited at: 9th Mar 2009 04:45
Well, that solves the line sequences problem, but creates a new one. Everthing starts blinking with the "flashing _". Also the text isn't actually distorted, it just gets larger, changing the apearance.

Login to post a reply

Server time is: 2024-09-28 02:26:22
Your offset time is: 2024-09-28 02:26:22