Login | Register   
RSS Feed
Download our iPhone app
Browse DevX
Sign up for e-mail newsletters from DevX

By submitting your information, you agree that devx.com may send you DevX offers via email, phone and text message, as well as email offers about other products and services that DevX believes may be of interest to you. DevX will process your information in accordance with the Quinstreet Privacy Policy.

Tip of the Day
Language: Visual Basic
Expertise: Beginner
Nov 13, 1998



Building the Right Environment to Support AI, Machine Learning and Deep Learning

Change the Appearance Property of a Text Box at Run Time

Sorry, you can't change the Appearance property of a text box at run time—but you can make it look like you have! If set to none, a 3-D picture box has a flat BorderStyle property. Put your text box (with a flat appearance) inside a picture box (with a 3-D appearance) and change the picture box's border style. Use this complete code-be sure you place Text1 inside Picture1:
Private m_Text1_Appearance As Long

Private Sub Form_Load()
	With Text1
		Picture1.Width = .Width
		Picture1.Height = .Height
		.Move 0, 0
	End With
	Text1_Appearance = 1  '3D
End Sub

Public Property Let _
	Text1_Appearance(nAppearance As Long)
	With Picture1
		Select Case nAppearance
			Case 0  'Flat
				.BorderStyle = nAppearance
			Case 1  '3D
				.BorderStyle = nAppearance
		End Select
	m_Text1_Appearance = .BorderStyle
	End With
End Property

Public Property Get Text1_Appearance() As Long
	Text1_Appearance = m_Text1_Appearance
End Property
Jim Deutch
Comment and Contribute






(Maximum characters: 1200). You have 1200 characters left.



Thanks for your registration, follow us on our social networks to keep up-to-date