• 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!
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.

Previously on "Find & Replace in VB6"

Collapse

  • xoggoth
    replied
    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.

    Leave a comment:


  • bogeyman
    replied
    Originally posted by crack_ho View Post
    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.

    Use the API SHGetSpecialFolderLocation with enum CSIDL_APPDATA to get 'C:\Documents and Settings\username\Application Data' or equivilent and store your configuration there.
    Yeah I know - piece of cake from .net framework but not so easy from VB6.

    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:


  • crack_ho
    replied
    Originally posted by bogeyman View Post
    Or gosh, even the REGISTRY.
    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.

    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:


  • wc2
    replied
    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:


  • Weltchy
    replied
    Originally posted by PRC1964 View Post
    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?
    Your assuming that the missus hasn't mistakenly re-mapped the drive letter already. In which case...

    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:


  • PRC1964
    replied
    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:


  • bogeyman
    replied
    Originally posted by lilelvis2000 View Post
    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.
    Or gosh, even the REGISTRY.

    Leave a comment:


  • lilelvis2000
    replied
    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:


  • DimPrawn
    replied
    Originally posted by wc2 View Post
    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.

    Ta
    Have you thought of moving to India? They are always looking for clever developers over there....

    Leave a comment:


  • wc2
    replied
    I'll get my coat

    Thanks

    Leave a comment:


  • TimberWolf
    replied
    In the IDE select Edit/Replace & Current Project

    Leave a comment:


  • wc2
    started a topic Find & Replace in VB6

    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.

    Ta
Working...
X