标签:
Apr 30, 2010. | |||||||||||||||||||
|
|||||||||||||||||||
Contents | |||||||||||||||||||
A picture is worth a thousand words | |||||||||||||||||||
Features | |||||||||||||||||||
Download Help file | |||||||||||||||||||
Best practices | |||||||||||||||||||
Quick start with a sample code | |||||||||||||||||||
Quick start with more advanced sample code | |||||||||||||||||||
Quick start with XMsg configuration utility | |||||||||||||||||||
Contact Information | |||||||||||||||||||
Full version includes complete source code (VS2005 C# Class Library project).
A download link will be automatically emailed to the email address you provide on PayPal page for the purchase transaction. |
A picture is worth a thousand words ..top |
Features ..top |
|
Download Help file ..top |
Depending on PC‘s security settings, the Help File may need to be unblocked after downloading. |
Best practices ..top |
Add XMsgLib reference to your .NET Windows Application project. Style MessageBoxes in your application in unique and creative way
Present user with more than 3 choices
Use wide variety of icons and backgrounds
Use MessageBox for collecting user input
Automatically close MessageBox after a specified amount of time
Link MessageBox dialog to the Web
|
Quick start with a sample code ..top |
? private void TestXMsgDialog() { ? //Message settings DlgMgr.AssignMessageFont("Arial", 27, 0, 1, 0, 0, 0); DlgMgr.MessageFontColor = Color.Navy; ? //Turning dialog extended features on //will affect all consecutive MessageBox.Show calls DlgMgr.DlgMonitorEnabled = true; ? MessageBox.Show("This is a test!", "Extended MessageBox .NET Assembly", MessageBoxButtons.OKCancel, MessageBoxIcon.Information); ? } ? |
A dialog produced by a sample code above: |
Quick start with more advanced sample code ..top |
? private void TestXMsgDialog() { ? //Dialog Dimension settings DlgMgr.AssignDlgMaxSize(570, 0); ? //Dialog Position settings DlgMgr.AssignDlgPosition(100, 200, XMessageBoxPositionMode.AbsolutePosition); ? //Dialog Button settings DlgMgr.AssignButtonCaption(XMessageBoxButton.ButtonAux01, "Download"); DlgMgr.AssignButtonCaption(XMessageBoxButton.ButtonCancel, "Exit"); DlgMgr.AssignButtonCaption(XMessageBoxButton.ButtonOk, "Next"); DlgMgr.AssignButtonFont(XMessageBoxButton.ButtonOk, "", 0, 0, 1, 0, 0, 0); ? //Dialog Background settings DlgMgr.UdfBackcolorsEnabled = true; DlgMgr.LoadBackColorFromSolidColor(XMessageBoxBackground.DlgWindow, Color.FromArgb(-399668)); DlgMgr.LoadBackColorFromSolidColor(XMessageBoxBackground.ToolBarWindow, Color.FromArgb(-4082785)); ? //Dialog Icon settings DlgMgr.UdfIconsEnabled = true; DlgMgr.LoadIconFromFileType(XMessageBoxIcon.UserIcon, "*.cs"); ? //Web Link Control settings DlgMgr.EnableHrefCtrl( "http://www.news2news.com/vfp/?solution=5", "Extended MessageBox .NET web page", Color.FromArgb(-16776961)); ? //CheckBox Control settings DlgMgr.EnableCheckBoxCtrl("Skip Intro", false); ? //Message settings DlgMgr.AssignMessageFont("Segoe UI", 14, 0, 0, 0, 0, 0); DlgMgr.MessageFontColor = Color.FromArgb(0x32, 0x32, 0x32); ? //Turning dialog extended features on //will affect all consecutive MessageBox.Show calls DlgMgr.DlgMonitorEnabled = true; ? MessageBox.Show("MessageBox Class displays a message box " + "that can contain text, buttons, and symbols " + "that inform and instruct the user.", "Extended MessageBox .NET Assembly", MessageBoxButtons.OKCancel, MessageBoxIcon.Information); ? //DlgMgr members populated upon dialog closing: ? //DlgMgr.ClosedOnTimeout //returns True when the dialog gets closed on a timeout; //otherwise returns False ? //DlgMgr.AuxButtonPressed //returns aux.button ID (11, 12, or 13) if that closed the dialog; //otherwise returns zero ? //DlgMgr.CheckBoxState //returns CheckBox control‘s Checked state; //returns False when the control was not shown ? //DlgMgr.TextInputValue //returns text entered in the Text Input control; //returns empty string when the control not shown ? } ? |
A dialog produced by a sample code above: |
Quick start with XMsg configuration utility ..top |
This utility generates comprehensive VB and C# code that you can copy and paste in your project. |
Contact Information ..top |
1361529 Ontario, Inc. Anatoliy Mogylevets E-Mail: devicecontext@msn.com |
Extended MessageBox Library (assembly) for .NET
标签:
原文地址:http://www.cnblogs.com/perock/p/4589694.html