窗口可以自己做。下面是popmessage的实现代码
全局代码
<DllImport("user32.dll", EntryPoint := "AnimateWindow")> _
Public Function AnimateWindow(handle As IntPtr, ms As Integer, flags As Integer) As Boolean
End Function
Public Const AW_HOR_POSITIVE As Int32 = &H1
Public Const AW_HOR_NEGATIVE As Int32 = &H2
Public Const AW_VER_POSITIVE As Int32 = &H4
Public Const AW_VER_NEGATIVE As Int32 = &H8
Public Const AW_CENTER As Int32 = &H10
Public Const AW_HIDE As Int32 = &H10000
Public Const AW_ACTIVE As Int32 = &H20000
Public Const AW_SLIDE As Int32 = &H40000
Public Const AW_BLEND As Int32 = &H80000
Public Class MyForm
Inherits System.Windows.Forms.Form
Public Sub new()
End Sub
Public Sub new(info As String)
Dim lbl As new Windows.Forms.Label
lbl.Text = info
lbl.Top = 100
lbl.left = 100
me.Controls.Add(lbl)
addhandler me.Load, AddressOf MyForm_Load
addhandler me.FormClosing, AddressOf MyForm_FormClosing
me.width = 200
me.height = 200
End Sub
Private Sub MyForm_Load(sender As Object, e As EventArgs)
Dim x As Integer = Windows.Forms.Screen.PrimaryScreen.WorkingArea.Right - Me.Width
Dim y As Integer = Windows.Forms.Screen.PrimaryScreen.WorkingArea.Bottom - Me.Height
Me.Location = New Point(x, y)
'设置窗体在屏幕右下角显示
AnimateWindow(Me.Handle, 1000, AW_SLIDE Or AW_ACTIVE Or AW_VER_NEGATIVE)
End Sub
Private Sub MyForm_FormClosing(sender As Object, e As Windows.forms.FormClosingEventArgs)
AnimateWindow(Me.Handle, 1000, AW_BLEND Or AW_HIDE)
End Sub
End Class
调用代码
Dim frm As new myform("ABCDEFG")
frm.show
关于样式,参考 http://www.cnblogs.com/KeenLeung/archive/2013/05/19/3087728.html