How do I align text within textbox so is is centered vertically

In VB.NET I would to align the text within textboxes to be centered vertically, rather than the default which seems to be top left.  I can only find ways to change the horizontal alignment.
Is it possible?
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

I don't believe so - unless you are prepared to sub-class the text box and handle the painting yourself

Public Class MyTextBox
    Inherits Windows.Forms.TextBox

    Public Enum VerticalAlignmentType
    End Enum

    Private m_VerticalAlignment As VerticalAlignmentType
    Public Property VerticalAlignment() As VerticalAlignmentType
            Return m_VerticalAlignment
        End Get
        Set(ByVal value As VerticalAlignmentType)
            m_VerticalAlignment = value
        End Set
    End Property

    Protected Overrides Sub OnPaint(ByVal e As System.Windows.Forms.PaintEventArgs)
    End Sub

End Class

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Moe DeShongCommented:
I use infragistics controls and it is built in.  Doesn't seem to be on the standard MS controls.
As Moed says, you can look at buying a commercial library.

Another option is to use Windows Presentation Foundation instead of WinForms.
The WPF textboxes have a lot more control including over vertical alignment.

However,  this is a big change if you have a significant investment in Winforms.  We would like to convert our Winforms controls to WPF but it is quite a daunting jump....
bmsdevAuthor Commented:
I was half expecting that.  Thanks anyway.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Visual Basic.NET

From novice to tech pro — start learning today.