dcsimg
Results 1 to 12 of 12

Thread: Code Module Window Order?

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Nov 2008
    Posts
    98

    Code Module Window Order?

    Does anyone know where the display "Order" (i.e. specifying the display order, front-to-back) of the code-module windows is specified, when the IDE is first opened?

    The initial ordering appears to have something to do with the order in which the modules are created, but there does not appear to be any way to change that order.

    I thought that the display-order might be the order of modules listed in the "Visual Basic Project Workspace" (.vbw) file, but after changing the listing-order in the .vbw file and then starting the project, the .vbw file returned to the original listing order. Apparently the "Order" is determined somewhere else.

    I have also been unable to find any reference to the .vbw file format.

    Thanks, X.

  2. #2
    PowerPoster Zvoni's Avatar
    Join Date
    Sep 2012
    Location
    To the moon and then left
    Posts
    2,094

    Re: Code Module Window Order?

    At a guess: in the registry! But i might be wrong!
    One System to rule them all, One IDE to find them,
    One Code to bring them all, and to the Framework bind them,
    in the Land of Redmond, where the Windows lie
    ---------------------------------------------------------------------------------
    People call me crazy because i'm jumping out of perfectly fine airplanes.
    ---------------------------------------------------------------------------------
    For health reasons i try to avoid reading unformatted Code

  3. #3
    Super Moderator si_the_geek's Avatar
    Join Date
    Jul 2002
    Location
    Bristol, UK
    Posts
    41,329

    Re: Code Module Window Order?

    It is in the vbw file, but I've got no idea about the file format.

    From experience, the z-order of the code/designer windows (and which are open) is specified by what you had when you save the project.

    If you want to keep a specific set of windows and z-order as the default, open the windows in that way and save the project. If you then exit VB and re-open the project, the windows should be preserved... if they are, find the vbw in Explorer, and right-click on it to set the properties so that it is read only.

  4. #4

    Thread Starter
    Lively Member
    Join Date
    Nov 2008
    Posts
    98

    Re: Code Module Window Order?

    Quote Originally Posted by si_the_geek View Post
    From experience, the z-order of the code/designer windows (and which are open) is specified by what you had when you save the project.
    One of the first things I tried was ordering the windows and then saving the project; this does not affect the Z-order. The original order is fixed by something else.

    Regarding the .vbw file: I tried an experiment, renamed the .vbw file and opened the project, of course no windows were opened. I opened the code windows of each module in the order I wanted them displayed. I saved the project, thus creating a new .vbw file and closed the project. When I reopened the project again the original order (from the original creation of the modules) was restored. That's why I stated that the .vbw file does not maintain the Z-order.

    Any other ideas?

  5. #5
    Super Moderator si_the_geek's Avatar
    Join Date
    Jul 2002
    Location
    Bristol, UK
    Posts
    41,329

    Re: Code Module Window Order?

    One potential thing is to change the order of items in the vbw file using Notepad, and see what effect that has.

  6. #6

    Thread Starter
    Lively Member
    Join Date
    Nov 2008
    Posts
    98

    Re: Code Module Window Order?

    As noted in the third paragraph of #1; I already tried re-ordering the .vbw file without success.

  7. #7
    PowerPoster Spoo's Avatar
    Join Date
    Nov 2008
    Location
    Right Coast
    Posts
    2,656

    Re: Code Module Window Order?

    Xytsrm

    So, it seems like you have tried several things, but without success.

    You don't say specfically, but I assume that you are not happy with
    the Z-Order's of various windows when you restart your app.

    If that is the case, would it help if you simply hardwire the several
    "problem" windows? By that, I mean to add a few lines of code to set
    the ZOrder of the "problem" windows. This should probably be done
    after all forms have loaded.

    Spoo

  8. #8

    Thread Starter
    Lively Member
    Join Date
    Nov 2008
    Posts
    98

    Re: Code Module Window Order?

    Spoo,
    I believe you misunderstand the problem. I'm referring to the Z-order of the "code-module" windows in the "IDE" during development. Not the Z-order of the windows in the running application.

  9. #9
    Super Moderator si_the_geek's Avatar
    Join Date
    Jul 2002
    Location
    Bristol, UK
    Posts
    41,329

    Re: Code Module Window Order?

    I wouldn't be surprised if it is actually possible using an Add-in, as they can do various things to code/designer windows.

    MZTools (link in my signature) might do this among the many other things it does, but I haven't checked. If it doesn't, you could always find/write one (I'm fairly sure there's an example add-in on the VB CD, but it wont have this particular feature).

  10. #10
    PowerPoster
    Join Date
    Aug 2011
    Location
    B.C., Canada
    Posts
    2,887

    Re: Code Module Window Order?

    When I modified my .vbp (group project) I could organize which module-code to show up first, even a form-code to show up first.

    Name:  IDE-Zorder.jpg
Views: 45
Size:  347.2 KB

    To change the zOrder, simply reorganize the file. The first written form/module will be the first to be loaded.

  11. #11
    PowerPoster Spoo's Avatar
    Join Date
    Nov 2008
    Location
    Right Coast
    Posts
    2,656

    Re: Code Module Window Order?

    Quote Originally Posted by xytsrm View Post
    Spoo,
    I believe you misunderstand the problem. I'm referring to the Z-order of the "code-module" windows in the "IDE" during development. Not the Z-order of the windows in the running application.
    That is an understatement if I ever saw one.
    My bad

    Spoo

  12. #12

    Thread Starter
    Lively Member
    Join Date
    Nov 2008
    Posts
    98

    Re: Code Module Window Order?

    Max187Boucher,

    Excellent, that's done it. Knew it had to be hiding somewhere.
    I was about to give-up; never considered opening the .vbp file with notepad.
    Well done, thanks so much,

    X.
    Last edited by xytsrm; Jul 20th, 2013 at 10:16 AM.

Posting Permissions

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



Featured


Click Here to Expand Forum to Full Width