CSharp AddressRegister Control



Click here for a larger image.

Environment: .NET Framework, CSharp (C#)
License: GNU PUBLIC LICENSE (GPL)

The control seems like the Microsoft Outlook Address Register Control (under Contacts) with a little bit more .NET-Style. I created this control due to my own need. I don't have enough time to create a big article about this control. You can easily add this control to your project and to your main form. Modify the buttons' labels thru the AddressManager.cs "buttons[]private string[] menuitems = new string[]{ ... };".

You can assign custom OnClick Events thru a function named "public void ButtonPressHandler(int, string)" in your main form.

There are three button states: ITEM_HOVER, ITEM_DEACTIVE, and ITEM_ACTIVE.

It takes just 10 minutes of your time to implement this control.

Your Main Form or MDI Parent Form


  {...}

  public class Form1 : System.Windows.Forms.Form
  {
    private RFCC_AddressManager.AddressManager aManager;

      {...}

      public Form1()
      {
        InitializeComponent();

        this.aManager = new RFCC_AddressManager.AddressManager
                        (this);
        this.aManager.BackColor = System.Drawing.Color.White;
        this.aManager.Dock = System.Windows.Forms.DockStyle.Left;
        this.aManager.Name = "aManager";
        this.aManager.Size = new System.Drawing.Size(48, 573);
        this.aManager.TabIndex = 0;
        this.Controls.Add(this.aManager);

      }
      
   {...}
   

    public void ButtonPressHandler( int button_number,
                                    string button_text )
    {
      switch( button_number ) {
        case 0:
          // ACTION FOR BUTTON 0
          break;
        case 1:
          // ACTION FOR BUTTON 1
          break;
        case 2:
          // ACTION FOR BUTTON 2
          break;
        default:
          // DEFAULT ACTION
          break;
      }
    }
  }

Downloads

Download demo project - 6 Kb
Download source - 17 Kb


Comments

  • There are no comments yet. Be the first to comment!

Leave a Comment
  • Your email address will not be published. All fields are required.

Top White Papers and Webcasts

  • Live Event Date: May 7, 2014 @ 1:00 p.m. ET / 10:00 a.m. PT This eSeminar will explore three popular games engines and how they empower developers to create exciting, graphically rich, and high-performance games for Android® on Intel® Architecture. Join us for a deep dive as experts describe the features, tools, and common challenges using Marmalade, App Game Kit, and Havok game engines, as well as a discussion of the pros and cons of each engine and how they fit into your development …

  • With JRebel, developers get to see their code changes immediately, fine-tune their code with incremental changes, debug, explore and deploy their code with ease (both locally and remotely), and ultimately spend more time coding instead of waiting for the dreaded application redeploy to finish. Every time a developer tests a code change it takes minutes to build and deploy the application. JRebel keeps the app server running at all times, so testing is instantaneous and interactive.

Most Popular Programming Stories

More for Developers

Latest Developer Headlines

RSS Feeds