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 / an input box

Author
Message
Towelie
20
Years of Service
User Offline
Joined: 21st Apr 2004
Location:
Posted: 16th Sep 2004 19:11 Edited at: 16th Sep 2004 19:21
alrihgt so now i need to make an input box and have the basics down...

first i dont want to use the "input" command becuase it dosent do all the things i want...like you can click into it or click out of it...

so what i have is basicly i box ive drawn onto the screen....when the user clicks it then a cursor type image thing will start blinking (or myb ill just hide the cursor for now (really not that important))

and then it will grab the scancode being any letter or number or capital letter or whatnot....so it will draw this letter into the box and move the cursor type thing over 1 and add that latter to a varible...possibly....

now i have 2 problems....

one is when they hit backspace i need to make one of the letters or numbers go off the screen...this isnt that hard becuase i just take it out of the draw sequance BUT i do need it to take it out of the varible....which i could just trunge a letter off the left with the
Left$(str, #) function BUT i have anohter problem...which is what if there in the center of the text or something....is there an easier way to do this then have a "counter" of where there cursor is or i could just not let them use arrow keys....

another thing is....is there any command that lets you do this without....all the work? it would be just like a TextBox in visual basic if anyone is familiar with that...

im using dbp btw....
sry for the long post ><



[edit]
also is there an easy way to get fromt he scancode back to the letter (like the asc cmd in vb...if anyone knows that languge
CattleRustler
Retired Moderator
21
Years of Service
User Offline
Joined: 8th Aug 2003
Location: case modding at overclock.net
Posted: 16th Sep 2004 23:56
there are a few plugins that have windows items in them as well as other useful things. You can check ours out by clicking the link below.


DBP_NETLIB_v1.4.3 DarkTOPIA site coming soon!
the_winch
21
Years of Service
User Offline
Joined: 1st Feb 2003
Location: Oxford, UK
Posted: 17th Sep 2004 02:14
A search for entry or input will pull up a few usefull threads.

http://forum.thegamecreators.com/?m=forum_view&t=37201&b=7
http://forum.thegamecreators.com/?m=forum_view&t=35085&b=7
http://forum.thegamecreators.com/?m=forum_view&t=33313&b=7

Generally it's better to use entry$ to get the keys that have been pressed. It won't lose characters and saves you from having to handle stuff like repeat rates yourself.


it's cool to hate
Towelie
20
Years of Service
User Offline
Joined: 21st Apr 2004
Location:
Posted: 17th Sep 2004 20:27
alright...well ive tried using inkey and entry...but the problem is they seem to be printing 2 letters at a time....like i would type a then f and it would print af all at once....any help?

ive looked at the posts and they confuse me ><

Login to post a reply

Server time is: 2024-11-27 09:52:22
Your offset time is: 2024-11-27 09:52:22