- Visitors can check out the Forum FAQ by clicking this link. You have to register before you can post: click the REGISTER link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. View our Forum Privacy Policy.
- Want to receive the latest contracting news and advice straight to your inbox? Sign up to the ContractorUK newsletter here. Every sign up will also be entered into a draw to WIN £100 Amazon vouchers!
Reply to: Find & Replace in VB6
Collapse
You are not logged in or you do not have permission to access this page. This could be due to one of several reasons:
- You are not logged in. If you are already registered, fill in the form below to log in, or follow the "Sign Up" link to register a new account.
- You may not have sufficient privileges to access this page. Are you trying to edit someone else's post, access administrative features or some other privileged system?
- If you are trying to post, the administrator may have disabled your account, or it may be awaiting activation.
Logging in...
Previously on "Find & Replace in VB6"
Collapse
-
I always read everything from plain old text files (except not with .txt exn as people fiddle) paths, form colours/backgrounds, images, sounds, number/size/positions of controls etc. Makes s/w a lot more flexible for updates.
-
Yeah I know - piece of cake from .net framework but not so easy from VB6.Originally posted by crack_ho View PostEven Microsoft have realised how absurd a central storage of configuraion settings is. Especially when it can't be backed up or restored. The new fashion is the old fashion to use local config files! This is what server 2008 is doing with its new components (xml config files). There will probably be a Microsoft patent on this amazing concept soon despite being industry standard for *nix.
Use the API SHGetSpecialFolderLocation with enum CSIDL_APPDATA to get 'C:\Documents and Settings\username\Application Data' or equivilent and store your configuration there.
The REGISTRY has it's good points (central, easy to find) but the monolithic binary formatted beast typified a lot of MSs design thinking at the time.
XML config isn't perfect either (lots of little unmanaged XML files all over place).
Maybe an XML-based registry in a database? But I swore I'd never, ever store XML in a database!
Ok, how about INI files?
Leave a comment:
-
Even Microsoft have realised how absurd a central storage of configuraion settings is. Especially when it can't be backed up or restored. The new fashion is the old fashion to use local config files! This is what server 2008 is doing with its new components (xml config files). There will probably be a Microsoft patent on this amazing concept soon despite being industry standard for *nix.Originally posted by bogeyman View PostOr gosh, even the REGISTRY.
Use the API SHGetSpecialFolderLocation with enum CSIDL_APPDATA to get 'C:\Documents and Settings\username\Application Data' or equivilent and store your configuration there.
Leave a comment:
-
Look I used to hump servers for a living until I got caught and had to do some real work.
I'll read up on the config file.
Thanks
Leave a comment:
-
Your assuming that the missus hasn't mistakenly re-mapped the drive letter already. In which case...Originally posted by PRC1964 View PostYou're all making this far too complex.
Simply create a batch file that re-maps the drive letters every time she loads the app and another one that re-maps it when she exits it.
What could possibly go wrong?
What about if the driver letters are mapped on a random basis, and then each drive can be scanned to see if the required database location is present. If found, then the new location for the database can then be mapped.
Problem solved!!!!!!
Leave a comment:
-
You're all making this far too complex.
Simply create a batch file that re-maps the drive letters every time she loads the app and another one that re-maps it when she exits it.
What could possibly go wrong?
Leave a comment:
-
Maybe while you're at it. why not have it read the database path from a config file. Those old .ini files come in handy sometimes. And I think VB6 can read them quite easily.
Leave a comment:
-
Have you thought of moving to India? They are always looking for clever developers over there....Originally posted by wc2 View PostI wrote an app which keeps records on Mrs. wc2's snakes.
She like the New Liar government wants to change the spec
It's hard coded to look for the database in c:\program files\my app\database.
Is there a way of executing a global find/replace?
I want the code to read f:\my app\database.
Ta
Leave a comment:
-
Find & Replace in VB6
I wrote an app which keeps records on Mrs. wc2's snakes.
She like the New Liar government wants to change the spec
It's hard coded to look for the database in c:\program files\my app\database.
Is there a way of executing a global find/replace?
I want the code to read f:\my app\database.
TaTags: None
- Home
- News & Features
- First Timers
- IR35 / S660 / BN66
- Employee Benefit Trusts
- Agency Workers Regulations
- MSC Legislation
- Limited Companies
- Dividends
- Umbrella Company
- VAT / Flat Rate VAT
- Job News & Guides
- Money News & Guides
- Guide to Contracts
- Successful Contracting
- Contracting Overseas
- Contractor Calculators
- MVL
- Contractor Expenses
Advertisers

Leave a comment: