DYLIKE

DSAPI实现简单的透明窗体

代码

    Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
        Dim B As New Bitmap(Me.Width, Me.Height)
        Using G As Graphics = Graphics.FromImage(B)
            G.TextRenderingHint = Drawing.Text.TextRenderingHint.AntiAliasGridFit
            G.Clip = New Region(New Rectangle(0, 0, Me.Width, Me.Height))
            'Dim Ft As Font = DSAPI.字体.读取资源字体(My.Resources.字体文件)
            DSAPI.图形图像.绘制描边文字(G, My.Resources.String1, Me.Font, New Rectangle(0, 0, Me.Width, Me.Height), Color.Black, Color.DarkGray)
        End Using
        DSAPI.图形图像.投影(B, 20, 30)
        DSAPI.控件.Form窗体.透明窗体样式显示图像(Me, B, 255)
        DSAPI.控件.Form窗体.鼠标点击任意位置拖动窗体(Me)
    End Sub

效果

posted on 2019-02-25 15:13  『DYLIKE』  阅读(519)  评论(0编辑  收藏  举报

导航

Live2D