dev右下角增加弹框提示信息
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 | using System; using System.Drawing; using System.IO; using System.Threading; using System.Windows.Forms; using DevExpress.XtraBars.Alerter; using DevExpress.XtraEditors; namespace WindowsFormsApplication1 { public partial class Form2 : XtraForm { public Form2() { InitializeComponent(); } private int alertheight = 0; delegate void DelegateShowAlert( string text); private void ShowAlertControl( string msg) { try { AlertControl alertControl1 = new AlertControl(); alertControl1.AutoFormDelay = 10000; //弹框显示10秒 //alertControl1.LookAndFeel.SkinName = "Office 2007 Blue"; alertControl1.LookAndFeel.Style = DevExpress.LookAndFeel.LookAndFeelStyle.Skin; alertControl1.BeforeFormShow += new AlertFormEventHandler(alertControl1_BeforeFormShow); alertControl1.Show( null , "提示信息" , msg, File.Exists(Application.StartupPath + "\\logo.ico" ) ? Image.FromFile(Application.StartupPath + "\\logo.ico" ) : null ); alertControl1.BeforeFormShow -= new AlertFormEventHandler(alertControl1_BeforeFormShow); } catch (Exception ex) { XtraMessageBox.Show(ex.Message, "登录提示信息失败" , MessageBoxButtons.OK, MessageBoxIcon.Information); } } private void alertControl1_BeforeFormShow( object sender, AlertFormEventArgs e) { e.AlertForm.Size = new Size(e.AlertForm.Size.Width + 50, 250 + alertheight); } private void simpleButton1_Click( object sender, EventArgs e) { //Thread.Sleep(10000); try { string msg = "\r\n本账号截止当前时间,您OA流程审批界面提醒如下:\r\n" ; msg += "\r\n" + "总共为" + ":0条记录没有审批,请及时处理!" ; msg += "\r\n详情请见:OA流程-OA审批流程记录" ; this .BeginInvoke( new DelegateShowAlert(ShowAlertControl), new object [] { msg }); Thread.Sleep(1000); } catch (Exception ex) { XtraMessageBox.Show(ex.Message, ex.GetType().ToString()); } } } } |
个人主要研究:金融系统、MIS系统、人力资源管理系统、数据采集系统、权限管理系统等等系统。主攻C#开发语言,Oracle、Sql Server,WCF和Remoting通信。
如需联系可加QQ:442389681 Email:lxc880615@163.com 手机:18922735098
QQ群交流:186841119 (请注明来自博客园)
博客园地址:http://www.cnblogs.com/jara/ http://www.cnblogs.com/luoyuhao/
提示:本文版权归作者和博客园共有,欢迎转载,但未经作者同意必须保留此段声明,且在文章页面明显位置给出原文连接,否则保留追究法律责任的权利。
如果觉得还有帮助的话,可以点一下右下角的【推荐】,希望能够持续的为大家带来好的技术文章!想跟我一起进步么?那就【关注】我吧。
如果对文章有任何问题,都可以在评论中留言,我会尽可能的答复您,谢谢您的阅读
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· Linux系列:如何用 C#调用 C方法造成内存泄露
· AI与.NET技术实操系列(二):开始使用ML.NET
· 记一次.NET内存居高不下排查解决与启示
· 探究高空视频全景AR技术的实现原理
· 理解Rust引用及其生命周期标识(上)
· 单线程的Redis速度为什么快?
· 阿里最新开源QwQ-32B,效果媲美deepseek-r1满血版,部署成本又又又降低了!
· 展开说说关于C#中ORM框架的用法!
· SQL Server 2025 AI相关能力初探
· Pantheons:用 TypeScript 打造主流大模型对话的一站式集成库
2013-11-07 GridControl 史上最全的资料(一)