devxlogo

Change the Appearance Property of a Text Box at Run Time

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 LongPrivate Sub Form_Load()	With Text1		Picture1.Width = .Width		Picture1.Height = .Height		.Move 0, 0	End With	Text1_Appearance = 1  '3DEnd SubPublic 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 WithEnd PropertyPublic Property Get Text1_Appearance() As Long	Text1_Appearance = m_Text1_AppearanceEnd Property
See also  Professionalism Starts in Your Inbox: Keys to Presenting Your Best Self in Email
devxblackblue

About Our Editorial Process

At DevX, we’re dedicated to tech entrepreneurship. Our team closely follows industry shifts, new products, AI breakthroughs, technology trends, and funding announcements. Articles undergo thorough editing to ensure accuracy and clarity, reflecting DevX’s style and supporting entrepreneurs in the tech sphere.

See our full editorial policy.

About Our Journalist