Programming Forums
User Name Password Register
 

RSS Feed
FORUM INDEX | TODAY'S POSTS | UNANSWERED THREADS | ADVANCED SEARCH

Reply
 
Thread Tools Display Modes
Old Apr 24th, 2007, 12:22 PM   #1
surf3rb0y
Newbie
 
Join Date: Dec 2006
Posts: 10
Rep Power: 0 surf3rb0y is on a distinguished road
Programming Interfaces

How can I make a preferences window open from my main gui to allow the user to input preference changes.

Ty
surf3rb0y is offline   Reply With Quote
Old May 20th, 2007, 11:11 AM   #2
mackenga
Professional Programmer
 
Join Date: Mar 2005
Location: Glasgow, Scotland
Posts: 317
Rep Power: 4 mackenga is on a distinguished road
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?"
mackenga is offline   Reply With Quote
Reply

Bookmarks

« Previous Thread in Forum | Next Thread in Forum »

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

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




DaniWeb IT Discussion Community
All times are GMT -5. The time now is 4:12 PM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC