Design
There are two ways to approach a custom control of the complexity of the Rolodex. One is to build it incrementally; the other is to design it up front. I typically build incrementally, factoring out common code as I go. However, to present all the myriad iterations as functionality is added one step at a time would be a book in itself.
Thus, as an expedient, I'm going to build this as if I were omniscient, anticipating in advance a complete design that I can then implement.[*]
Your Rolodex will be housed in forms. You will have a Rolodex form for Customers, a second Rolodex form for Suppliers, and one each for Employees and Orders (you'll only implement Customers here; the others will be left as an exercise).
These four forms will all derive from a common base form, frmRolodex. The job of frmRolodex will be to hold the code and design common to all the derived forms.
Within each of these forms will be a Rolodex panel. The job of the panel will be to:
Display all the buttons (a-z)
Display twelve Rolodex entries at a time
Display the scrollbars
The Rolodex panel is shown in Figure 4-2.

Figure 4-2. Rolodex panel
Within the panel are Rolodex entries. You'll design a MustInherit base class, RolodexEntry, and then you'll derive classes (like RolodexCustomerEntry) from it. These classes will specialize what information goes in the entry. For Customers, you want the customer name, contract, ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access