TIP: Click on subject to list as thread! ANSI
echo: power_bas
to: GARY MAJOR
from: CHRIS ADAMS
date: 1995-03-13 16:12:00
subject: Input

On (11 Mar 95) Gary Major wrote to Daniel Stasinski...
 >-> Let me try and clarify. When ever i try and use a simple input
 >-> statement to get info. the window looks fine but the text is in
 >-> standard IDE text form. So you have a black block with a word in it
 >-> ontop of a nice window.
 > If you are using PB/VISION PRO, you should not be
 > using INPUT statements
 > to get information from the user.  This is completely
 > contrary to the
 > purpose of the product.  You should either be using
 > PB/WORKSHOP to
 > design your dialogs, or PB/VISION PRO's dialog (data
 GM> I am not using pb/vision pro or pb/workshop, I am using pbvlite.  I like
 GM> your program very much But right now I cannot afford the jump the 
pbvision
 GM> pro, hell The exchange rates being what they are I cannot afford to
Okay, what you need to do is use INKEY$ and handle it on your own. Print
with the appropriate routines, etc. Here's some code I used to use:
'-----------------------------------------------------------------------------
-
FUNCTION Fileget$(Handle%, Title$, TKolor%, DatType)
DIM Winfo as WinType
Wingetinfo Handle%, winfo
Wintitle Handle%, TKolor%, Title$
Winprint Handle%, 1,1, &H07, STRING$(vcols, ".")
WINCLS Handle%
WINLOCATE Handle%, 1,1
WINCOLOR Handle, &H17
LOCATE winfo.row+1, winfo.col+1,1
TEMP$=""
DO
	A$=UCASE$(INKEY$)
	IF LEN(A$) THEN
		VALA=ASC(RIGHT$(A$,1))
		IF LEN(A$)=2 THEN VALA=-VALA
		SELECT CASE DATTYPE
			CASE 1
				SELECT CASE VALA
					CASE 42, 63, 32, 124
					CASE 48 TO 58, 65 TO 126, 33 TO 41, 45,46
						TEMP$=TEMP$+A$
						WINPRINT Handle%, 1,1, &H17, TEMP$+"   "
						LOCATE ,POS(0)+1
					CASE 8
						IF LEN(TEMP$)>0 THEN
							TEMP$=LEFT$(TEMP$, LEN(TEMP$)-1)
							LOCATE ,POS(0)-1
							WINPRINT Handle%, 1,1, &H17, TEMP$+"   "
							WINLOCATE Handle%, 1, POS(0)
						END IF
					CASE 13
					CASE ELSE
				END SELECT
			CASE 2
				SELECT CASE VALA
					CASE 42, 63, 32, 124
					CASE 48 TO 57, 65 TO 91, 93 TO 126, 33 TO 41, 45
						IF LEN(TEMP$)<8 OR INSTR(RIGHT$(TEMP$, 3), ".") THEN
							TEMP$=TEMP$+A$
							LOCATE ,POS(0)+1
							WINPRINT Handle%, 1,1, &H17, TEMP$+"   "
						ELSE
						END IF
					CASE 46
						IF NOT INSTR(TEMP$, ".") THEN
							TEMP$=TEMP$+A$
							LOCATE ,POS(0)+1
							WINPRINT Handle%, 1,1, &H17, TEMP$+"   "
						END IF
					CASE 8
						IF LEN(TEMP$)>0 THEN
							TEMP$=LEFT$(TEMP$, LEN(TEMP$)-1)
							LOCATE ,POS(0)-1
							WINPRINT Handle%, 1,1, &H17, TEMP$+"   "
							WINLOCATE Handle%, 1, POS(0)
						END IF
					CASE 13
					CASE ELSE
				END SELECT
		END SELECT
        END IF
LOOP UNTIL A$=CHR$(13) OR LEN(TEMP$)>77
fileget$=RTRIM$(TEMP$, "\")
LOCATE ,,0
END FUNCTION
... Dragons again?  I activate my +6 Surface-to-Air Missile battery.
--- PPoint 1.88
---------------
* Origin: The Point of Obfuscation! (1:212/2001.5)

SOURCE: echomail via exec-pc

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.