码迷,mamicode.com
首页 > Web开发 > 详细

Extended MessageBox Library (assembly) for .NET

时间:2015-06-19 21:36:50      阅读:278      评论:0      收藏:0      [点我收藏+]

标签:

Apr 30, 2010.
技术分享
Summary: With this library .NET applications can control a wide variety of MessageBox dialog settings. 

That includes adjusting initial position and size of the dialog, selecting message font and font color, filling dialog background with solid colors or bitmap files, modifying button captions & fonts, loading dialog icons from external files, accepting text input, opening web pages, dialog timeout and more. 

Once configured, the extended features are persistent through the application‘s session affecting each regular MessageBox.Show call.

技术分享
 
Regular price:
  Buy this solution for $30.00
Instant download link by email.
 
Price for subscribers:
技术分享   Buy this solution for $20.00
Instant download link by email.
 
技术分享Download demo
技术分享
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
技术分享
技术分享
  • Adjustable message font and font color. The dialog resizes automatically to accomodate messages in fonts larger than regular.
  • Dialog background can be painted with solid colors, hatch patterns, bitmap files
  • Dialog icon can be loaded from ICO file, resource file (EXE, DLL), or a file type (e.g. *.pdf)
  • Dialog‘s width and height can be either restricted or forced to specified values
  • Dialog window can be positioned at a specified point, or aligned with monitor border
  • A click on the message opens a web page in default browser
  • A click on the icon opens a web page in default browser
  • Button captions and fonts can be user-defined
  • Buttons can be disabled
  • Buttons can have tooltips
  • Three additional buttons available
  • Additional controls available: Text Input, CheckBox, WebLink
  • The dialog can be closed on timeout
  • OS supported: Windows 2000 / XP / 2003 / Vista / 7
技术分享
技术分享
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
  • Add code configuring extended MessageBox features to the Init section of the application.
  • When application runs, all MessageBox dialogs appear on screen having extended features configured uniformly: dimensions, position, fonts, backgrounds etc.

        Present user with more than 3 choices
  • Adjust dialog button captions (for example [Yes, No and Cancel] becomes [Forward, Back and Stop] )
  • Activate up to 3 additional buttons
  • Draw user attention to a button by choosing a different font.
  • Add tooltips to some buttons.
  • Disable some of dialog buttons optionally.
  • Enable CheckBox control. Its Checked status can be retrieved after the dialog returns control to the application.

        Use wide variety of icons and backgrounds
  • Display dialog icons contained in ICO files, in resource files, and linked to file types.
  • Paint dialog background with solid colors, hatch patterns, and with bitmap files.

        Use MessageBox for collecting user input
  • Enable Text Input control each time a text input from user is expected: password, error description, and so on.

        Automatically close MessageBox after a specified amount of time
  • Assign Timeout parameter (milliseconds). This can make a difference for an application running in occasionally unattended mode.

        Link MessageBox dialog to the Web
  • Enable Web Link control
  • Assign web link to the dialog icon.
  • Assign web link to the dialog message.
技术分享
技术分享
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

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!