DSAPI實現簡單的透明窗體
阿新 • • 發佈:2019-02-25
窗體 ant hand ron alias int 鼠標 resources ali
代碼
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
效果
DSAPI實現簡單的透明窗體