|
-
Jun 13th, 2024, 12:18 PM
#1
Thread Starter
Member
-
Jun 13th, 2024, 02:35 PM
#2
Re: Controls like textbox with background image?
-
Jun 13th, 2024, 03:07 PM
#3
Re: Controls like textbox with background image?
I like that Ben!!
I did something SIMILAR (but not the same) with only a few lines of code...it is not exactly what OP asked for, but they might like it. It looks like this after someone types into the textbox:

But while typing in the text box, it changes like this until you hit enter:

If that's okay, here is the code:
Code:
Option Explicit
Private Sub Label1_Click()
Text1.Left = Label1.Left
Text1.Top = Label1.Top
Text1.ZOrder (0)
Text1.Visible = True
Text1.SetFocus
Label1.Visible = False
End Sub
Private Sub Text1_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
Label1.Caption = Text1.Text
Text1.Visible = False
Label1.Visible = True
End If
End Sub
The textbox and label (labelbackGround property set to transparent) are the same size.
Sam I am (as well as Confused at times).
-
Jun 14th, 2024, 12:19 PM
#4
Thread Starter
Member
Re: Controls like textbox with background image?
Thank you very much guys, both are very good solutions, I will reconsider the use of the dynamics between the label and the textbox.
Ben's solution is the closest to what I was looking for, although when testing the test project, using the debugger generates some unfortunate process crashes.
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|