![]() |
Languages »
VB.NET »
Windows Forms
Intermediate
License: The Code Project Open License (CPOL)
Reusable Application Options DialogBy Greg OsborneA component to add a reusable Options dialog to your application. |
VB.NET1.1, Win2K, WinXP, WinForms, VS.NET2003, Dev
|
|
Advanced Search Add to IE Search |
|
|
|
||||||||||||||||

Tired of recreating an Options dialog for every application you make? Using this component, you can specify a hierarchical structure in the registration database under a vendor and application specific key, and automatically read, construct, and update the settings with minimal code. Or, if you store your settings somewhere else, you can use the component in Manual mode and read and save them at your will.
A sample project and a help document is included. To add the component to the Components tab of your toolbox, compile the solution and then select the Components toolbox tab, right-click and select Add/Remove item..., then navigate to the OSSystem.ApplicationOptions.dll file, and select it.
Add the component to a form and off you go!
Once the VendorName and ApplicationName properties are set, the component will look in the registration database under the HKEY_CURRENT_USER\Software\<VendorName>\<ApplicationName> key for the base options key. Note the image below:

The Options key is the base options key. Other keys located under this are Category keys. Values within the keys are options. The options have special formatting, but don't let that bother you...the component takes care of creating and managing these for you.
There are methods on the ApplicationOptions component and the Category class to handle creating categories and options. It would behoove you to take a gander at the Help file before using the component.
There are two type of dialogs: Tabbed view and Tree view. A tabbed view presents hierarchical data as a set of tabs nested inside tab pages. As you can imagine, if the hierarchy gets too deep, the tabbed view loses its appeal. The tree view presents its data much like the Visual Studio Options dialog, and nesting is not a problem there since it only displays the options for one category at a time.
Many properties of the ApplicationOptions component are used to determine how the dialog will look and react. See the help file for the properties usagee and settings.
| You must Sign In to use this message board. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
General
News
Question
Answer
Joke
Rant
Admin
Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+PgUp/PgDown to switch pages.
|
PermaLink |
Privacy |
Terms of Use
Last Updated: 17 Dec 2008 Editor: Sean Ewington |
Copyright 2005 by Greg Osborne Everything else Copyright © CodeProject, 1999-2010 Web17 | Advertise on the Code Project |