Results 1 to 14 of 14

Thread: Renaming a Project with inline controls

  1. #1

    Thread Starter
    Lively Member IndicSoftware's Avatar
    Join Date
    Aug 2017
    Location
    India
    Posts
    85

    Renaming a Project with inline controls

    Hello,

    I am trying to modify the superb and feature rich PhotoDemon image editor written by Tanner Helland.

    This project has 52 inline controls.

    As I am planning to add a few features to it, I want to rename the project from PhotoDemon to PhotoDemonNewV.

    As soon as I change the project name in Project Properties dialog most of the inline controls get converted into picture box.

    Is there any reliable way to rename the project while keeping everything intact?

    Regards,
    --
    From,
    Indic Software


    Revolutionary Visual Programming IDE.

  2. #2
    gibra
    Guest

    Re: Renaming a Project with inline controls

    First of all: make a copy of the original PhotoDemon project, then:
    - open (if close) the Project panel (F4) from View menu
    - open (if close) the Project manager panel (CTRL+R) from View menu
    - on Project manager panel select the name of project (should be the first item) , i.e.: PhotoDemon - PhotoDemon.vbp
    - on Project panel now you see only the project name PhotoDemon, then rename PhotoDemon to PhotoDemonNewV
    All user controls will be updated automatically.
    Save the project.
    Last edited by gibra; Jul 11th, 2018 at 02:17 AM.

  3. #3

    Thread Starter
    Lively Member IndicSoftware's Avatar
    Join Date
    Aug 2017
    Location
    India
    Posts
    85

    Re: Renaming a Project with inline controls

    Hello,

    Thanks for the tip. I have already tried that and all possible ways but without success.
    Here is what error I am getting Name:  PhotoDemonRenameError.png
Views: 211
Size:  4.4 KB

    In this dialog if I click on Debug VB hangs and I am not even able to exit from it.

    But if click on End I will be presented another control name with the same or similar error.

    Regards,
    --
    From,
    Indic Software


    Revolutionary Visual Programming IDE.

  4. #4
    gibra
    Guest

    Re: Renaming a Project with inline controls

    Right.
    This occur because VB6 make a ReadOnly copy of each file while change it.

    Alternatives:
    1) Copy the entire project to a different folder (i.e. PhotoDemoNew) ed use this folder. Of course, rename the VBP file to PhotoDemoNew.vbp
    2) use a text editor to change the project name within the FRM files (not recommended)

  5. #5
    PowerPoster
    Join Date
    Feb 2017
    Posts
    5,064

    Re: Renaming a Project with inline controls

    Hello, when I need to do such changes, I do them by text editing all the files.

    I use the freeware program TexRep for mass text replace.

    Of course the project must be closed from the IDE before doing that and make a full project backup first.

    In your case, it would be to replace PhotoDemon with PhotoDemonNewV in all and every project file.

  6. #6

    Thread Starter
    Lively Member IndicSoftware's Avatar
    Join Date
    Aug 2017
    Location
    India
    Posts
    85

    Re: Renaming a Project with inline controls

    @Gibra, @Eduardo,

    Thanks for the tips. I had completely forgotten that we can edit the .frm and .ctl files in a text editor.

    I did that and now am able to open the project and also compile it!

    Thanks again for your invaluable help.

    Regards,
    --
    From,
    Indic Software


    Revolutionary Visual Programming IDE.

  7. #7
    PowerPoster Elroy's Avatar
    Join Date
    Jun 2014
    Location
    Near Nashville TN
    Posts
    9,937

    Re: Renaming a Project with inline controls

    Yeah, when I'm doing something like this, I just typically rename the project from within the VB6 IDE, and all else happens automatically.

    However, when I do need to do it manually with an editor, I typically use Notepad++ which also has very nice multi-file search-and-replace features. It can easily open multiple files (from Windows Explorer), and then go through them searching-and-replacing whatever you'd like. I know everyone has their favorites, but NP++ is definitely my fall-back code editor. I've even got a fairly nice VB6 template for it. I'll export-and-post it if anyone would like it. It's close enough to the VB6 IDE that I sometimes get confused about why Intellisense isn't working (which clearly it won't when in NP++).

    Y'all Take Care,
    Elroy
    Any software I post in these forums written by me is provided "AS IS" without warranty of any kind, expressed or implied, and permission is hereby granted, free of charge and without restriction, to any person obtaining a copy. To all, peace and happiness.

  8. #8
    PowerPoster
    Join Date
    Feb 2017
    Posts
    5,064

    Re: Renaming a Project with inline controls

    Quote Originally Posted by Elroy View Post
    Yeah, when I'm doing something like this, I just typically rename the project from within the VB6 IDE, and all else happens automatically.

    However, when I do need to do it manually with an editor, I typically use Notepad++ which also has very nice multi-file search-and-replace features. It can easily open multiple files (from Windows Explorer), and then go through them searching-and-replacing whatever you'd like. I know everyone has their favorites, but NP++ is definitely my fall-back code editor. I've even got a fairly nice VB6 template for it. I'll export-and-post it if anyone would like it. It's close enough to the VB6 IDE that I sometimes get confused about why Intellisense isn't working (which clearly it won't when in NP++).

    Y'all Take Care,
    Elroy
    Hello, I never used NP++ with multiple files. But TexRep I referred is not an editor, it is a program to perform bulk replace operations (without opening them on the screen).

  9. #9
    PowerPoster Elroy's Avatar
    Join Date
    Jun 2014
    Location
    Near Nashville TN
    Posts
    9,937

    Re: Renaming a Project with inline controls

    Yeah, you can use NP++ to just do the replacements in the set-of-files you have open:

    Name:  rep1.jpg
Views: 155
Size:  39.3 KB

    Or, you can go directly to disk and do the replacements to a set-of-files on disk, similar to your utility:

    Name:  rep2.png
Views: 157
Size:  17.6 KB

    I've used NP++ for years, and just love it as a text/code editor. When setup correctly, it will also match your parentheses, braces, and other block definitions. It also indents/un-indents blocks of code similar to code windows in the VB6 IDE. It's also got very nice file-comparison functions in it, which I often use.

    But hey, it's just my preferred text editor. I have it set as the Windows default program for BAS, FRM, CLS, CTL, & PAG files. When I double-click these in Windows explorer, I'd rather they load with NP++ rather than a single file in the VB6 IDE. Of course, VBP and VBG files still load with the IDE.

    Take Care,
    Elroy
    Any software I post in these forums written by me is provided "AS IS" without warranty of any kind, expressed or implied, and permission is hereby granted, free of charge and without restriction, to any person obtaining a copy. To all, peace and happiness.

  10. #10
    PowerPoster
    Join Date
    Feb 2017
    Posts
    5,064

    Re: Renaming a Project with inline controls

    OK. But may be I wasn't clear. With TexRep the files don't need to be open. There is no identation and such things, it is a simple text replace tool for files that are in a folder.
    You can test it for yourself, it could take just a couple of minutes: TexRep.

  11. #11
    gibra
    Guest

    Re: Renaming a Project with inline controls

    I agree 100% with Elroy.

    NP++ is much powerful than TexRep, because you can see what files will be intersted before to replace.
    In fact, if you use the Find All button, instead of Replace All (no document is opened) , NP++ will list all files into a windows. Great.

    So, by example, you can se that if replacing PhotoDemo. with new name PhotoDemonVnew. will change more file as you expected.

    IMHO

  12. #12

    Thread Starter
    Lively Member IndicSoftware's Avatar
    Join Date
    Aug 2017
    Location
    India
    Posts
    85

    Re: Renaming a Project with inline controls

    My Personal favorite is also NP++. I use it all the times.

    Regards,
    --
    From,
    Indic Software


    Revolutionary Visual Programming IDE.

  13. #13
    PowerPoster
    Join Date
    Feb 2017
    Posts
    5,064

    Re: Renaming a Project with inline controls

    Comparing NP++ with TexRep is like comparing a Ferrari with a lift truck.
    TexRep only does replacing, nothing else, and it does it well and simple.

    I suspect that the people here talking about TexRep never used it and don't know what it does. (it is just a guess)

  14. #14
    PowerPoster
    Join Date
    Feb 2017
    Posts
    5,064

    Re: Renaming a Project with inline controls

    Edit: For some reason the post got duplicated, so deleted...

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width