04-04-2025, 02:25 AM
(04-04-2025, 01:20 AM)Pete Wrote: So the concept is to make a hardware form with a transparent input slot in which our SCREEN 0 program can display text.
Code: (Select All)$Color:32
w = _Width: h = _Height
fw = _FontWidth: fh = _FontHeight
Dim As Long t, img
t = _NewImage(250, 100, 32)
_Dest t
Color _RGB32(90, 90, 90)
For h = 1 To 100 \ fh
Locate h, 1
For i = 1 To 250 \ fw ' Build form out of solid blocks except over text input area.
If h = 4 Then
If i >= 9 And i <= 29 Then
Locate , Pos(0) + 1
Else
Print Chr$(219);
End If
Else
Print Chr$(219);
End If
Next
Next
Color White, _RGB(90, 90, 90) ' add text to the form and outline the input bo.
Locate 2, 13: Print "My Form"
Locate 4, 3: Print "Text:"
Line (fw * 8 - 3, fh * 3 - 3)-(fw * 29 + 2, fh * 4 + 2), _RGB32(255, 255, 255), B
img = _CopyImage(t, 33)
_FreeImage t
_Dest 0
Color 15, 0
Locate 4, 9, 1, 7, 7 ' Show cursor.
Do
_Limit 30
_PutImage (0, 0), img
b$ = InKey$
If b$ = Chr$(8) And Pos(0) > 9 Then
Locate , Pos(0) - 1: Print " ";: Locate , Pos(0) - 1
_Continue
End If
If b$ = Chr$(27) Then System
If Len(b$) = 1 And Pos(0) < 29 Then
If Asc(b$) >= 32 And Asc(b$) <= 122 Then
Print b$;
End If
End If
Loop
For folks who are very comfortable in graphics, the line with BF statement could have been used multiple times to make the block minus the input slot.
If anyone thinks they have an easier method, using a hardware form on top of Screen 0, let me know. It would be a fun discussion.
Pete
Fascinating, and ingenious! (not that I'm ever likely to use screen zero).
Great for Zerophiles!
Of all the places on Earth, and all the planets in the Universe, I'd rather live here (Perth, Western Australia.) 
Please visit my Website at: http://oldendayskids.blogspot.com/

Please visit my Website at: http://oldendayskids.blogspot.com/

