Foxtable(狐表)用户栏目专家坐堂 → 吐糟下popmessage


  共有2763人关注过本帖树形打印复制链接

主题:吐糟下popmessage

帅哥哟,离线,有人找我吗?
rjh4078
  1楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:狐精 帖子:3370 积分:24858 威望:0 精华:0 注册:2012/3/26 21:47:00
吐糟下popmessage  发帖心情 Post By:2016/7/11 9:12:00 [只看该作者]

  老大多弄点样式啊  我的屏幕每次弹出的时候 下面突然白一片 然后冒出个窗口 这个动画效果好生硬


 回到顶部
帅哥哟,离线,有人找我吗?
大红袍
  2楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:贵宾 帖子:39310 积分:196782 威望:0 精华:1 注册:2015/4/25 9:23:00
  发帖心情 Post By:2016/7/11 9:52:00 [只看该作者]

窗口可以自己做。下面是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

 


 回到顶部
帅哥哟,离线,有人找我吗?
rjh4078
  3楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:狐精 帖子:3370 积分:24858 威望:0 精华:0 注册:2012/3/26 21:47:00
  发帖心情 Post By:2016/7/13 13:27:00 [只看该作者]

还是没搞懂样式怎么弄


 回到顶部
帅哥哟,离线,有人找我吗?
大红袍
  4楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:贵宾 帖子:39310 积分:196782 威望:0 精华:1 注册:2015/4/25 9:23:00
  发帖心情 Post By:2016/7/13 16:00:00 [只看该作者]

编写全局代码。

 

然后做一个按钮编写调用代码。


 回到顶部