Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Transparent text box

Status
Not open for further replies.

WGenzo

Programmer
Nov 28, 2001
4
IT
Some idea on how to make transparent a text box?
I would like to have the effect of "writing on a bitmap" and not in a text box!!!
The same with grids.

Saludos a todos los que me aiudan y tambièn a todos los otros. mail to pietcio@libero.it
 
Here try this(I was bored)... You could probably find a better method somewhere on the web. It works fine except there is no blinking caret. Click on the picture box to type.


You need:

A Text box with Multiline set to True
A Label, and a PictureBox



Private Declare Function Putfocus Lib "user32" Alias "SetFocus" (ByVal hwnd As Long) As Long

Private Sub Form_Load()

Label1.BackStyle = 0
Label1.Top = 0: Label1.Left = 0
Label1.Width = Picture1.Width
Label1.Height = Picture1.Height
Text1.Top = -4000
Text1.Width = Picture1.Width
Text1.Height = Picture1.Height



End Sub

Private Sub Picture1_Click()
Putfocus (Text1.hwnd)
End Sub

Private Sub Text1_Change()
Label1.Caption = Text1.Text
End Sub
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top