Click here to Skip to main content
12,298,085 members (51,484 online)
Click here to Skip to main content

Stats

48.7K views
4.3K downloads
49 bookmarked
Posted

A Reflective and Translucent Glass Panel

, 1 Oct 2008 CPOL
Component derived from Panel that acts like a window (glass)
Imports System.Drawing

Module Formatting

    Public Function GetStringFormat(ByVal Alignment As ContentAlignment) As StringFormat
        Dim sfText As New StringFormat
        Select Case Alignment
            Case ContentAlignment.BottomCenter, ContentAlignment.MiddleCenter, ContentAlignment.TopCenter
                sfText.Alignment = StringAlignment.Center
            Case ContentAlignment.BottomLeft, ContentAlignment.MiddleLeft, ContentAlignment.TopLeft
                sfText.Alignment = StringAlignment.Near
            Case ContentAlignment.BottomRight, ContentAlignment.MiddleRight, ContentAlignment.TopRight
                sfText.Alignment = StringAlignment.Far
        End Select
        Select Case Alignment
            Case ContentAlignment.BottomCenter, ContentAlignment.BottomLeft, ContentAlignment.BottomRight
                sfText.LineAlignment = StringAlignment.Far
            Case ContentAlignment.MiddleCenter, ContentAlignment.MiddleLeft, ContentAlignment.MiddleRight
                sfText.LineAlignment = StringAlignment.Center
            Case ContentAlignment.TopCenter, ContentAlignment.TopLeft, ContentAlignment.TopRight
                sfText.LineAlignment = StringAlignment.Near
        End Select
        Return sfText
    End Function

    Public Function RemoveAmpersand(ByVal Text As String) As String
        Return Text.Replace("&", "")
    End Function

End Module

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

Share

About the Author

Nicolas Wälti
Software Developer (Senior)
Switzerland Switzerland
No Biography provided

You may also be interested in...

| Advertise | Privacy | Terms of Use | Mobile
Web01 | 2.8.160525.2 | Last Updated 1 Oct 2008
Article Copyright 2008 by Nicolas Wälti
Everything else Copyright © CodeProject, 1999-2016
Layout: fixed | fluid