Get Dim cp As CreateParams = MyBase.CreateParamsįor any form, we can use this code to make it transparent:Ĭopy Code Private Sub Timer1_Tick( ByVal sender As System. (size), memDc, (pointSource), 0, (blend), 2)Įnd Try End Sub ' Properties Protected Overrides ReadOnly Property CreateParams() As CreateParams Win32.UpdateLayeredWindow( MyBase.Handle, screenDc, (topPos), _ OldBitmap = Win32.SelectObject(memDc, hBitmap)ĭim size As New Size(bitmap.Width, bitmap.Height)ĭim topPos As New Point( MyBase.Left, MyBase.Top) HBitmap = bitmap.GetHbitmap(Color.FromArgb( 0)) If (bitmap.PixelFormat 32bppArgb) Then Throw New ApplicationException( " The bitmap must be 32ppp with alpha-channel.")Įnd If Dim screenDc As IntPtr = Win32.GetDC( IntPtr.Zero)ĭim memDc As IntPtr = Win32.CreateCompatibleDC(screenDc) MyBase.ShowInTaskbar = False End Sub Protected Overrides Sub Dispose( ByVal disposing As Boolean)Įnd Sub Public Sub SetBitmap( ByVal bitmap As Bitmap)Įnd Sub Public Sub SetBitmap( ByVal bitmap As Bitmap, ByVal opacity As Byte) Public StartLeft As Integer Public StartTop As Integer Public Ang As Double Public WithEvents tim As New Timer
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |