![]() |
|
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Newbie
Join Date: Dec 2006
Posts: 10
Rep Power: 0
![]() |
Programming Interfaces
How can I make a preferences window open from my main gui to allow the user to input preference changes.
Ty |
|
|
|
|
|
#2 |
|
Professional Programmer
Join Date: Mar 2005
Location: Glasgow, Scotland
Posts: 317
Rep Power: 4
![]() |
This is a really general question! If you're talking VB6 the very basic answer is to create a form which will be your preference page and set up the controls on it so it looks right, then add the code to make it work right. A tradition in VB6 is to store things like configuration options in global variables; it's not pleasant, but nothing about classic VB is really. I usually create a module for my global variables to live in to ease the pain slightly.
Then you just need to set its visibility to false initially and then Show it at the appropriate time. If it has Ok and Cancel buttons their Click handlers should set the global variables and then hide the preferences form, and just hide the preferences form, respectively. Like I say your question is really too general but I hope this helps a bit. You can use a Tabbed Dialog control for a nice preferences page. Oh, also, it's nice to have your application save and load settings; the cleanest way to do this is probably using the registry, but INI files are still in common use too. I have collegues who would create a 'configuration' class, which 'encapsulates' the whole management of settings - but they're kidding themselves in my view since VB classes are not real classes anyway. I wouldn't use VB for anything big enough to warrant tidy programming - it would be too frustrating.
__________________
"I'm not a genius. Why do I have to suffer?" |
|
|
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Programming without post secondary education | Eric the Red | Other Programming Languages | 6 | Mar 7th, 2006 5:56 PM |
| Does Programming Make You Smarter? | Sane | Coder's Corner Lounge | 43 | Oct 2nd, 2005 6:12 AM |
| MIT's Metaphor For Software Programming | Infinite Recursion | Other Programming Languages | 2 | Jun 12th, 2005 6:42 AM |