Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Peek-a-boo Hardware Form Concept
#2
(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!  Big Grin
Of all the places on Earth, and all the planets in the Universe, I'd rather live here (Perth, Western Australia.) Big Grin
Please visit my Website at: http://oldendayskids.blogspot.com/
Reply


Messages In This Thread
Peek-a-boo Hardware Form Concept - by Pete - 04-04-2025, 01:20 AM
RE: Peek-a-boo Hardware Form Concept - by PhilOfPerth - 04-04-2025, 02:25 AM
RE: Peek-a-boo Hardware Form Concept - by Pete - 04-04-2025, 08:13 AM
RE: Peek-a-boo Hardware Form Concept - by Pete - 04-04-2025, 04:07 PM
RE: Peek-a-boo Hardware Form Concept - by Pete - 04-05-2025, 07:37 PM
RE: Peek-a-boo Hardware Form Concept - by Pete - 04-07-2025, 11:29 PM
RE: Peek-a-boo Hardware Form Concept - by bplus - 04-08-2025, 12:34 AM
RE: Peek-a-boo Hardware Form Concept - by Pete - 04-08-2025, 01:14 AM
RE: Peek-a-boo Hardware Form Concept - by Pete - 04-08-2025, 04:49 PM
RE: Peek-a-boo Hardware Form Concept - by Pete - 04-09-2025, 04:52 PM
RE: Peek-a-boo Hardware Form Concept - by Pete - 04-10-2025, 09:49 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  CHALLENGE: Make a better drag and drop to a form. Pete 0 202 12-20-2025, 08:41 AM
Last Post: Pete
  Writing on hardware form by switching display order. Pete 0 444 04-09-2025, 03:00 AM
Last Post: Pete
  Screw Peek-a-boo. Write on a hardware image form. Pete 0 444 04-08-2025, 11:28 PM
Last Post: Pete
  Hardware images for buttons,popups and inputboxes: an insane way? TempodiBasic 2 596 04-06-2025, 07:19 AM
Last Post: TempodiBasic
  Hardware Popup Menu. Yes, Dragable! Pete 2 682 04-03-2025, 12:15 AM
Last Post: Pete

Forum Jump:


Users browsing this thread: 1 Guest(s)