Click here to Skip to main content
Click here to Skip to main content
Go to top

DialogBoxes

, 31 Oct 2006
Rate this:
Please Sign up or sign in to vote.
Frequently used Dialog Boxes

Introduction

This article is a demonstration of the usage of three types of most frequently used dialog boxes. The first One is the Input Box. This One is very usefull in C#.net because, I think there is no sunch a thing in it. Its is as same as the one VB. Its has four overloading methods The Second one is the Combo Input Box. Which is slightly modified from The Input Box. Here we populate the Combo Box by passing a string array and select or enter a new value. The Third is the Change Password Dialog Box. Here we pass the current password and validate it with the new password and confirm password and get the new password on OK.

The Code

First Add the Dialog Boxs.dll file into refrence.
 using DialogBoxs; 
Input Text Box
TextInputBox ObjTextInputBox= new TextInputBox();
            if( ObjTextInputBox.Show("Enter the Value",this.Text) == DialogResult.OK)
                MessageBox.Show("The Entered Value : "+ObjTextInputBox.Text);
Input Combo Box

ComboInputBox ObjComboBox = new ComboInputBox();
            string[] Names=new string[10];
            Names[0]="India";
            Names[1]="USA";
            Names[2]="UK";
            Names[3]="RUSSIA";
            Names[4]="Bulgaria";
            Names[5]="Singapore";
            Names[6]="Malayasia";
            Names[7]="Japan";
            Names[8]="Thailand";
            if(ObjComboBox.Show("Select or Enter the Country",this.Text,Names) == DialogResult.OK)
                MessageBox.Show("The Selected or Entered Country : "+ObjComboBox.Text);
Change Password
ChangePasswordDialogBox ObjChangePasswordDialogBox= new ChangePasswordDialogBox();
            if (ObjChangePasswordDialogBox.Show("Enter the Details to Change Password",this.Text,"123456")==DialogResult.OK)
                MessageBox.Show("New Password : " +ObjChangePasswordDialogBox.NewPassword);
Sample image

Summary

This is a simple project.The Main Intension of this project is make C#.net as easy as Vb.net, as the early contains a Input Box with less features. Please do give any ideas or any requirments which are frequently need in the projects.

License

This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here

Share

About the Author

ChandraSekar Maheswaran
Web Developer
India India
Hi,
Am Chandru. I'm a Software developer. Am concentrating Only on Microsoft Technologies more than others. Don't ask me why..! I usually write codes a lot.. I do them because I Like them. Am working in a software firm in India. i've done a Post Graduation in Computers.

Comments and Discussions

 
GeneralHINTS Pinmembergmt521-Nov-06 1:33 
GeneralRe: HINTS PinmemberChandraSekar Maheswaran1-Nov-06 1:52 
GeneralRe: HINTS PinmemberDominik Reichl1-Nov-06 2:07 
GeneralRe: HINTS PinmemberXaroth1-Nov-06 3:41 
GeneralRe: HINTS PinmemberChandraSekar Maheswaran1-Nov-06 2:07 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

| Advertise | Privacy | Mobile
Web03 | 2.8.140916.1 | Last Updated 1 Nov 2006
Article Copyright 2006 by ChandraSekar Maheswaran
Everything else Copyright © CodeProject, 1999-2014
Terms of Service
Layout: fixed | fluid