Page 1 of 5 1234 ... LastLast
Results 1 to 40 of 174

Thread: Modernizing the VB6 IDE

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Aug 2006
    Posts
    84

    Lightbulb Modernizing the VB6 IDE

    Modern VB v1.7 has been released!

    Here's a brief changelog:

    - Included detailed instructions on the root of the release explaining all the procedures necessary to correctly setup ModernVB
    - Menu icons have been updated with a few new icons and tweaks
    - Project Explorer icons are now replaced by modern icons automatically (thanks to Olaf Schmidt for the concept)
    - Initial support for international languages on the add-in side (requires using the optimal settings registry file)
    - Patches now include English, French, Spanish and Chinese language support as well as unlimited undo/redo functionality
    - Minor tweaks and fixes (Gauge bar docking to Menu should work correctly now)

    If you're one of the people who haven't been able to use ModernVB because your Visual Basic is not in English, give this release a shot!

    See the release thread for details!




    Hello everyone!

    I have this project I made for personal use a few years ago, and recently I've been considering releasing it to the public so I began to refine and expand it.

    Essentially, it's a suite of modifications that attempt to modernize the Visual Basic 6 IDE to bring it more in line with modern applications and make it more functional and pleasing to the eye. Assuming there's interest in the community, I'm planning to release the package along with source codes in this forum once I've ironed out a few final kinks with the code.




    So far my project is comprised of 5 different elements that work to enhance Visual Basic.

    • A registry file you can merge that will add modern, full color visual studio icons to all the VB6 menus. Incidentally, Microsoft has made all the Visual Studio icons free to use at no cost without requiring a license, so there's no copyright infringement whatsoever from this.
    • A custom add-in for the IDE I wrote which replaces the standard VB6 toolbars with replacement toolbars that use modern icons instead (this was required in order to avoid icons disappearing when items are disabled or unavailable in the regular toolbars).
    • XDelta patch files for VB6.exe, VBA6.dll and VBIDE.dll that replace the native resources with high quality icons and bitmaps. Some minor adjustments to VB6.exe's assembly code were also required to force the IDE to render bitmaps in full 24bit color depth instead of 4bit by default. My patch also includes a manifest file to enable visual styles for controls within the Visual Basic IDE.
    • Registry files with custom themes and fonts to enhance the look of the IDE as well as some configuration presets for an optimal coding experience.
    • And finally, I'm compiling a list of all the addins I personally use or otherwise recommend that greatly extend the IDE's functionalities or interface, including links of where to legally obtain them.





    That's it in a nutshell. I was mostly wondering if anyone here would have an interest in this project. Likewise, if any of you guys have attempted something similar, what kind of modifications have you made to your IDE to improve it or make it more appealing?

    I've attached a couple screenshots (for now, only with the default theme) of my efforts so far, including an animated GIF that showcases the menu icons.

    Let me know what you guys think of this whole idea!










    New Feature #1: Toggling Visual Basic panels



    New Feature #2: Predefined UI Layouts






    Original VB6 IDE for comparison:








    EDIT: Removed attachments, using direct links for full resolution.
    Last edited by LinkFX; May 2nd, 2020 at 04:37 AM. Reason: Replaced low quality attachments with direct links to the images

  2. #2
    PowerPoster
    Join Date
    Feb 2012
    Location
    West Virginia
    Posts
    13,172

    Re: Modernizing the VB6 IDE

    That is a lot of icons on the toolbar. To many IMO.

    The modern features that I find lacking in the IDE are Tabs and the ability to collapse blocks of code.

  3. #3
    Lively Member Episcopal's Avatar
    Join Date
    Mar 2019
    Location
    Brazil
    Posts
    98

    Re: Modernizing the VB6 IDE

    Very interesting, and that's what I always wanted. Congratulations for the initiative.

    How about implementing the sidebar that expands and collapses with the mouse?

  4. #4
    Fanatic Member
    Join Date
    Feb 2019
    Posts
    706

    Re: Modernizing the VB6 IDE

    I see that you have CodeSMART Addin installed. Is it the one that's adding code windows Tabs, Code Flow Explorer, and the dotted lines in code?

    I have posted a link to an open source Addin that adds Tabs to code windows and how to compile it here. I didn't write it, but it's getting us closer to a modern IDE.

  5. #5
    Addicted Member
    Join Date
    Jun 2016
    Location
    Espaņa
    Posts
    147

    Re: Modernizing the VB6 IDE

    very interesting, looks great.

    Greetings

  6. #6
    Hyperactive Member
    Join Date
    Aug 2011
    Location
    Palm Coast, FL
    Posts
    339

    Re: Modernizing the VB6 IDE

    I looked at your images on imgur.com. I note that you have both CodeSmart and MZTools installed. The result is many icons displayed and other modifications made to the VB IDE. TBH - I'm having a hard time distinguishing which UI changes are made by your project vs those two other utility suites. Maybe if I could see how your project changes the default VB6 IDE, it would be easier for me to distinguish your contributions???

  7. #7
    PowerPoster Arnoutdv's Avatar
    Join Date
    Oct 2013
    Posts
    3,845

    Re: Modernizing the VB6 IDE

    Codesmart does a lot of changes, also for the editor

  8. #8

    Thread Starter
    Lively Member
    Join Date
    Aug 2006
    Posts
    84

    Re: Modernizing the VB6 IDE

    Quote Originally Posted by DataMiser View Post
    That is a lot of icons on the toolbar. To many IMO.

    The modern features that I find lacking in the IDE are Tabs and the ability to collapse blocks of code.
    Tabs can be added through either the CodeSmart (paid) or CodeTabs (free) addins.

    I do also sorely miss being able to collapse blocks of code. I feel like that's probably a feature possible to include through an add-in however.

    Quote Originally Posted by Episcopal View Post
    Very interesting, and that's what I always wanted. Congratulations for the initiative.

    How about implementing the sidebar that expands and collapses with the mouse?
    Thank you. I'm not sure I understand what you mean though. What windows are you referring to? Are you asking for a way to collapse all the docked windows? Now there's an idea...

    Quote Originally Posted by AAraya View Post
    I looked at your images on imgur.com. I note that you have both CodeSmart and MZTools installed. The result is many icons displayed and other modifications made to the VB IDE. TBH - I'm having a hard time distinguishing which UI changes are made by your project vs those two other utility suites. Maybe if I could see how your project changes the default VB6 IDE, it would be easier for me to distinguish your contributions???
    Here you go. I've added a screenshot with no add-ins loaded but my own. It's certainly cleaner looking but you lose on a lot of functionality. I personally don't mind the overabundance of toolbar icons. Once you get used to them and all they can do for you and begin regularly using those features, you realize they're not in fact excessive and you'll start wondering how you ever lived without them.

    But you can always trim down your toolbar to the absolutely essentials if you prefer a more minimalistic look. I just enjoy having all my options easily available, and it's a constant reminder of all the tools I have at my disposal, whereas hiding them would lead to doing more things manually that would have been easier to do with the extensions.

    Clean VB UI with just the ModernVB Addin loaded:

    P.S. The debug toolbar docked to the left of the window is an actual VB toolbar. This is necessary as the VB IDE hides all addin toolbars while the program is running, so you can't use the addin toolbars outside of design mode. The one downside to this is that unavailable icons are just shown as empty rather than greyed out. I have yet to find a better solution for this issue.
    Last edited by LinkFX; Apr 15th, 2020 at 04:55 AM.

  9. #9
    Member
    Join Date
    Feb 2015
    Posts
    35

    Re: Modernizing the VB6 IDE

    Interesting project. I personally have no problems with the VB6 IDE. When I'm busy working on code, I don't notice much about the IDE beyond whatever I'm working on and therefore don't really miss any so-called modernization, eye candy, etc. but I can see where it might be appealing.....

  10. #10
    Lively Member Episcopal's Avatar
    Join Date
    Mar 2019
    Location
    Brazil
    Posts
    98

    Re: Modernizing the VB6 IDE

    Thank you. I'm not sure I understand what you mean though. What windows are you referring to? Are you asking for a way to collapse all the docked windows? Now there's an idea...

    exactly .....
    Attached Images Attached Images  

  11. #11

    Thread Starter
    Lively Member
    Join Date
    Aug 2006
    Posts
    84

    Re: Modernizing the VB6 IDE

    Quote Originally Posted by Episcopal View Post
    exactly .....
    Alright, that should be possible. I'll give it a shot.

  12. #12
    Fanatic Member
    Join Date
    Feb 2014
    Location
    Norfolk UK (inbred)
    Posts
    512

    Re: Modernizing the VB6 IDE

    I think it looks great and I applaud any addition of customisation that brings the choice of modernisation to the world of VB6. Some think that modern-looking interfaces make a tool more "up to date" and therefore more usable - I can't understand why myself. My first fix would be to make the interface even more retro.

    If you look at the VB6 'modern' style icons above, they are now out of fashion and the older flatter ones that VB6 came with are much more in keeping with Windows Win10/Metro interface guidelines. The so-called improved ones above have 3D effects, shadows &c that Microsoft themselves are dispensing with (I don't agree with it, I'm just saying).

    I always just hang around knowing that one day everything comes back into fashion, you just have to wait long enough. The old VB6 IDE look and feel will one day be trendy... perhaps.

    I do think that what you've done could be useful if it allows others to customise the VB6 IDE in their own style.

  13. #13

    Thread Starter
    Lively Member
    Join Date
    Aug 2006
    Posts
    84

    Re: Modernizing the VB6 IDE

    Quote Originally Posted by yereverluvinuncleber View Post
    I think it looks great and I applaud any addition of customisation that brings the choice of modernisation to the world of VB6. Some think that modern-looking interfaces make a tool more "up to date" and therefore more usable - I can't understand why myself. My first fix would be to make the interface even more retro.

    If you look at the VB6 'modern' style icons above, they are now out of fashion and the older flatter ones that VB6 came with are much more in keeping with Windows Win10/Metro interface guidelines. The so-called improved ones above have 3D effects, shadows &c that Microsoft themselves are dispensing with (I don't agree with it, I'm just saying).

    I always just hang around knowing that one day everything comes back into fashion, you just have to wait long enough. The old VB6 IDE look and feel will one day be trendy... perhaps.

    I do think that what you've done could be useful if it allows others to customise the VB6 IDE in their own style.
    I personally can't stand the oversimplified flat UI trend we've migrated towards these days purely on account of mobile devices, which is why I went for the classic Visual Studio 2013 icons. That and both MZ Tools and CodeSmart already use that style so it remains consistent.

    That said, the way VB6 handled its UI all those decades ago is absolutely astounding in its foresight. How many toolbars and menu controls are you aware of that have *native* replacement of icons allowing you to draw and paste brand new ones from within the software itself??
    Last edited by LinkFX; Apr 13th, 2020 at 07:56 AM.

  14. #14
    PowerPoster
    Join Date
    Sep 2012
    Posts
    2,070

    Re: Modernizing the VB6 IDE

    VB6 is a timeless classic in software products.

  15. #15
    Lively Member Episcopal's Avatar
    Join Date
    Mar 2019
    Location
    Brazil
    Posts
    98

    Re: Modernizing the VB6 IDE

    I have this project I made for personal use a few years ago, and recently I've been considering releasing it to the public so I began to refine and expand it.
    When are you going to do this? Certainly some will support others not.

    What is missing to start getting the job done?

  16. #16

    Thread Starter
    Lively Member
    Join Date
    Aug 2006
    Posts
    84

    Re: Modernizing the VB6 IDE

    Quote Originally Posted by Episcopal View Post
    When are you going to do this? Certainly some will support others not.

    What is missing to start getting the job done?
    Well, I've been experimenting with trying to get a good dark theme for the IDE. Here are some preview screenshots, but there's some things that will have to be tweaked through the ModernVB add-in code if possible, such as some fonts rendering black always instead of whatever the system's default font color for the theme is using. Some of the icons also don't look as great since VB doesn't support transparency and they were clearly designed with light aliased borders.





    I also want to try and get that functionality for hiding the panels as you suggested, notice the toolbar on the right in the screenshots above. I could probably get the add-in to toggle them easily enough, but what I'd really like to do is intercept the actual native event handler in the IDE for those buttons and have them toggle between hiding and showing the panels (they only ever show by default). That way both the menu and main toolbar buttons for those panels would also work instead of only the toolbar on the right doing it. I've yet to give that a shot though.
    Last edited by LinkFX; Apr 15th, 2020 at 04:57 AM.

  17. #17
    Lively Member Episcopal's Avatar
    Join Date
    Mar 2019
    Location
    Brazil
    Posts
    98

    Re: Modernizing the VB6 IDE

    I also want to try and get that functionality for hiding the panels as you suggested, notice the toolbar on the right in the screenshots above. I could probably get the add-in to toggle them easily enough, but what I'd really like to do is intercept the actual native event handler in the IDE for those buttons and have them toggle between hiding and showing the panels (they only ever show by default)
    Yes you can try to retrieve the handle through the classname ... I even saw this discussion here on vbforums.

    Do you still intend to open the source code? If so, open a github account.

  18. #18
    Member
    Join Date
    Dec 2016
    Posts
    39

    Re: Modernizing the VB6 IDE

    sorry, the URL of "https://imgur.com/vH5us9f" can't be open
    would you upload the file to forum?

  19. #19

    Thread Starter
    Lively Member
    Join Date
    Aug 2006
    Posts
    84

    Re: Modernizing the VB6 IDE

    Quote Originally Posted by vb56390 View Post
    sorry, the URL of "https://imgur.com/vH5us9f" can't be open
    would you upload the file to forum?
    I just tested all the links in the thread, including that one and they all load just fine here. Regardless, I've updated the posts to use direct linking instead of attachments, that should solve the issues.
    Last edited by LinkFX; Apr 15th, 2020 at 04:57 AM.

  20. #20

    Thread Starter
    Lively Member
    Join Date
    Aug 2006
    Posts
    84

    Re: Modernizing the VB6 IDE

    I've just implemented two new, quite nifty new features for this project!

    New Feature #1: Toggling Visual Basic panels



    As originally requested by Episcopal.

    VB has several menus and toolbar items that allow you to show UI elements such as the Project Explorer, Properties window etc... What it lacks however is an easy way to toggle these elements. The buttons by default only attempt to show these panels, and if they are already visible they simply do nothing.

    My add-in successfully hijacks the event handlers for these entries and replaces the code with actual toggling functionality, in addition to displaying a pinned toolbar on the right corner which allows you to quickly toggle any panels you like. Even the original buttons work (Shortcut keys however don't trigger the replacement code. If anyone has any idea how to trap and handle these do let me know)!

    Additionally, I've added some code to attempt to keep the panels the exact size they were before they are toggled. VB by default really likes messing up the size of panels when they are toggled on and off and there's more than two panels per zone.

    New Feature #2:Predefined UI Layouts



    This feature allows you to quickly toggle all the relevant UI elements with one button so that you can switch to the optimal view for whatever task you're going to be focusing in. Going into Code View? No point having the Properties, Form Layout and Toolbox windows there taking up space. Going back to designer mode? Have those show up immediately again. I even added support for custom panels like CodeSmart's designer and code flow panels and the Document Map add-in to be part of the automatic layouts! Check the preview to see it in action!

    By far, the most challenging to implement yet most interesting part of this feature was a predefined layout for Runtime mode. As soon as you launch your program in the IDE, the Immediate, Local and Watches window will all appear and once the execution is stopped, they will return to whatever state they were in before. This necessitated figuring out a way to determine the state the IDE was in and immediately react to the changes which was quite the challenge given that the native VB Environment object bindings are quite limited and do not expose anything remotely viable for this.

    But alas, it's done, and all the background trickery is done silently and transparently with zero stability issues.

    ---------------

    Let me know what you guys think and if you have any other ideas you'd like to see added to this project. Once I feel this project is essentially feature complete, I'll set it up on Github and release it on the forums.

    ---------------

    P.S. The VB IDE has this really annoying behavior where it disables all add-in toolbars and hooked elements when the project is executed. Does anyone know of a way to get around this? Either unhooking the menu items somehow or whatever it takes. It's really quite annoying, and the only way I could think to get past this is far more of a kludge than I'm honestly comfortable with.
    Last edited by LinkFX; Apr 15th, 2020 at 05:46 AM.

  21. #21
    Lively Member Episcopal's Avatar
    Join Date
    Mar 2019
    Location
    Brazil
    Posts
    98

    Re: Modernizing the VB6 IDE

    Let me know what you guys think and if you have any other ideas you'd like to see added to this project. Once I feel this project is essentially feature complete, I'll set it up on Github and release it on the forums
    Good job ... I just don't like to contribute to people who speak badly about VB6.

    So I left the forum where I like to access.

  22. #22

    Thread Starter
    Lively Member
    Join Date
    Aug 2006
    Posts
    84

    Re: Modernizing the VB6 IDE

    I'm not sure I understand, what people speak badly of VB6?

  23. #23
    Fanatic Member
    Join Date
    Mar 2010
    Posts
    537

    Re: Modernizing the VB6 IDE

    This is wonderful.
    A few questions:

    1- Can this be installed without interfering with the Microsoft VB6 already installed on the computer?
    In other words can Microsoft VB6 and your modernized VB IDE co-exist on one same computer without interfering with each other?

    2- Is it fully unicode-aware (all the textboxes, etc)?
    How about reading and writing unicode text files?
    How about files with unicode file names or folder names?

    3- Does it support integers of longer than 4 bytes for example 8 byte integers?

    4- Does it have a good grid?
    Please note that VB6's grid is very buggy.

    5- Is it 64-bit?

    Thanks.

  24. #24
    Hyperactive Member
    Join Date
    Jul 2007
    Location
    Essex, UK.
    Posts
    501

    Re: Modernizing the VB6 IDE

    @Ilia I think you have misunderstood. This is an add-in to the existing IDE. Thus it does present some new functions but basically the answer to all of your questions is -NO.

  25. #25
    Fanatic Member
    Join Date
    Feb 2019
    Posts
    706

    Re: Modernizing the VB6 IDE

    Quote Originally Posted by IliaPreston View Post
    This is wonderful.
    A few questions:

    1- Can this be installed without interfering with the Microsoft VB6 already installed on the computer?
    In other words can Microsoft VB6 and your modernized VB IDE co-exist on one same computer without interfering with each other?
    Yes.
    Quote Originally Posted by IliaPreston View Post
    2- Is it fully unicode-aware (all the textboxes, etc)?
    How about reading and writing unicode text files?
    How about files with unicode file names or folder names?
    No.
    Quote Originally Posted by IliaPreston View Post
    3- Does it support integers of longer than 4 bytes for example 8 byte integers?
    No.
    Quote Originally Posted by IliaPreston View Post
    4- Does it have a good grid?
    Please note that VB6's grid is very buggy.
    No.
    Quote Originally Posted by IliaPreston View Post
    5- Is it 64-bit?
    No.

    The Add-in only make visual changes to VB6 IDE(not your apps), like better toolbar icons. It doesn't add any other functionality. Also, the first post included pictures that includes CodeSMART Add-in, which is not free($250). It added tabs(to code windows) and other things. See post #8 with that Add-in removed. There is a free alternative if you want to add tabs, see post #4 for details.

  26. #26

    Thread Starter
    Lively Member
    Join Date
    Aug 2006
    Posts
    84

    Re: Modernizing the VB6 IDE

    Yeah this isn't a third party IDE replacement -- I wish! It's just an add-in and a collection of tweaks to improve the existing VB6 IDE. As for your questions.

    1- Can this be installed without interfering with the Microsoft VB6 already installed on the computer?
    In other words can Microsoft VB6 and your modernized VB IDE co-exist on one same computer without interfering with each other?
    Yes, but there's really no reason to run the original unmodded IDE when you can run this instead. Just back up the original files before you patch them is all.

    2- Is it fully unicode-aware (all the textboxes, etc)?
    How about reading and writing unicode text files?
    How about files with unicode file names or folder names?
    All of this can be done in regular VB6. Just use Krool's common controls for Unicode aware controls, and it's not too difficult to write the other stuff you asked for. I'm sure it's somewhere in the VB6 Codebank already.

    3- Does it support integers of longer than 4 bytes for example 8 byte integers?
    Use the currency type for this and just multiply by 10k for the correct result.

    4- Does it have a good grid? Please note that VB6's grid is very buggy.
    VB6's grid works fine if you use a lower amount of twips. I recommend 24. Just don't have the grid visible cause it's too dense at these values.

    5- Is it 64-bit?
    Above everything else this is what I wish was possible the most. The day someone with the necessary skills writes a third party 64bit VB6 compiler will be one of the happiest days in my life.

    The Add-in only make visual changes to VB6 IDE(not your apps), like better toolbar icons. It doesn't add any other functionality. Also, the first post included pictures that includes CodeSMART Add-in, which is not free($250). It added tabs(to code windows) and other things. See post #8 with that Add-in removed. There is a free alternative if you want to add tabs, see post #4 for details.
    CodeTabs is indeed a pretty good alternative, that along with Rubberduck and MZ-tools 3 will get you virtually all of CodeSmart's features for free, bar very few. I'm just lucky to have a license for that since the company I used to work for licensed that and a few other tools for everyone, and once they went under I got to keep the licenses I used.

  27. #27
    Lively Member Episcopal's Avatar
    Join Date
    Mar 2019
    Location
    Brazil
    Posts
    98

    Re: Modernizing the VB6 IDE

    Rubberduck
    Until today I have not been able to use this tool. When vb starts it gives an error and the library is disabled.

  28. #28

    Thread Starter
    Lively Member
    Join Date
    Aug 2006
    Posts
    84

    Re: Modernizing the VB6 IDE

    Quote Originally Posted by Episcopal View Post
    Until today I have not been able to use this tool. When vb starts it gives an error and the library is disabled.
    Strange. It works just fine here. Are you running the latest SP6 for VB6?

  29. #29
    Member
    Join Date
    Aug 2016
    Posts
    47

    Re: Modernizing the VB6 IDE

    Hello,
    Could I upload the attachment that I deleted to a github or give the details how to modify it?

  30. #30
    Lively Member Episcopal's Avatar
    Join Date
    Mar 2019
    Location
    Brazil
    Posts
    98

    Re: Modernizing the VB6 IDE

    It works just fine here. Are you running the latest SP6 for VB6?
    yes.

  31. #31
    Member
    Join Date
    Dec 2016
    Posts
    39

    Re: Modernizing the VB6 IDE


    So, when can we get this Modern VB6 IDE?

  32. #32

    Thread Starter
    Lively Member
    Join Date
    Aug 2006
    Posts
    84

    Re: Modernizing the VB6 IDE

    Quote Originally Posted by vb56390 View Post

    So, when can we get this Modern VB6 IDE?
    Once this is solved I guess.

    Didn't really get any help with it so far.

  33. #33
    PowerPoster
    Join Date
    Jun 2013
    Posts
    4,923

    Re: Modernizing the VB6 IDE

    Quote Originally Posted by LinkFX View Post
    Once this is solved I guess.
    Why not replace that old Project-Tree-Listing completely?
    (in the ScreenShot, there seems to be a good candidate directly below).

    Olaf

  34. #34
    PowerPoster
    Join Date
    Jul 2010
    Location
    NYC
    Posts
    2,532

    Re: Modernizing the VB6 IDE

    Is this just external cosmetic things, or are you modifying the exe/dll files themselves?

    Just ask because something I've found extremely useful, given that we're all on at least 1080p monitors, is expanded the size of the listbox in References and Components. I also rearrange the Procedure Attributes dialog to make that tiny text box for entering a procedure description bigger.

    I suppose you could do it with a whole bunch of API, but it's super simple since they're stored as 'Dialog' resources in a res file to just change the x/y/cx/cy in the resource script.




    Either way, looking forward to trying this out!

  35. #35
    Lively Member
    Join Date
    Feb 2007
    Posts
    83

    Re: Modernizing the VB6 IDE

    I LOVE the dark theme - I've changed over to using it on many other programs (especially coding ones) as it is MUCH easier on the eyes after hours and hours of staring at the monitor!

    I anxiously look forward to giving your effort a try. I'd even be willing to donate a little something in appreciation!

  36. #36

    Thread Starter
    Lively Member
    Join Date
    Aug 2006
    Posts
    84

    Re: Modernizing the VB6 IDE

    Quote Originally Posted by fafalone View Post
    Is this just external cosmetic things, or are you modifying the exe/dll files themselves?

    Just ask because something I've found extremely useful, given that we're all on at least 1080p monitors, is expanded the size of the listbox in References and Components. I also rearrange the Procedure Attributes dialog to make that tiny text box for entering a procedure description bigger.

    I suppose you could do it with a whole bunch of API, but it's super simple since they're stored as 'Dialog' resources in a res file to just change the x/y/cx/cy in the resource script.




    Either way, looking forward to trying this out!
    I'm modifying the exe/dll themselves. You can read about it in the intro post.

    I had actually already done that one modification, along with tons of other dialogs in the IDE :

    Really though, this is basically ready for release, but I'd really like to work out that toolbar issue so it doesn't release 95% complete. >.<

  37. #37

    Thread Starter
    Lively Member
    Join Date
    Aug 2006
    Posts
    84

    Re: Modernizing the VB6 IDE

    Quote Originally Posted by Schmidt View Post
    Why not replace that old Project-Tree-Listing completely?
    (in the ScreenShot, there seems to be a good candidate directly below).

    Olaf
    Yeah I sometimes use the Project Explorer from CodeSmart, but I really like the combo of having the Designer panel open along with the original Project Explorer while in Design mode, and then switching that to Flow when you open the Code Panel. So much so that I had the layout change automatically to those.

    Besides, it's kind of unfair to expect everyone to have a paid add-in replacement available for use isn't it?

    You seem to be one of the best programmers in this website, do you have any ideas for replacing those 3 toolbar buttons? It's basically all that stands before me and release now, unless I were to just leave it be and release a 95% complete version.
    Last edited by LinkFX; Apr 25th, 2020 at 05:02 PM.

  38. #38
    Hyperactive Member
    Join Date
    Aug 2017
    Posts
    335

    Re: Modernizing the VB6 IDE

    Quote Originally Posted by LinkFX View Post
    By far, the most challenging to implement yet most interesting part of this feature was a predefined layout for Runtime mode. As soon as you launch your program in the IDE, the Immediate, Local and Watches window will all appear and once the execution is stopped, they will return to whatever state they were in before. This necessitated figuring out a way to determine the state the IDE was in and immediately react to the changes which was quite the challenge given that the native VB Environment object bindings are quite limited and do not expose anything remotely viable for this.
    Have you already tried hooking VBBuildEvents? (right-click anywhere in the Object Browser to bring up the context menu and click the Show Hidden Members to reveal it)

    Name:  VBBuildEvents.png
Views: 483
Size:  4.4 KB

    Quote Originally Posted by LinkFX View Post
    ... and if you have any other ideas you'd like to see added to this project.
    You might be interested in some of the features of the attached unfinished add-in (e.g., it can automatically set certain properties of a newly added Form to your preferred defaults).
    Attached Files Attached Files

  39. #39

    Thread Starter
    Lively Member
    Join Date
    Aug 2006
    Posts
    84

    Re: Modernizing the VB6 IDE

    I experimented with VBBuildEvents but it's far too limited to be of used to me. For one the event triggers before the IDE makes its own changes to the layout, so any changes I make to say, the visibility of the immediate window or other panels will get immediately undone. Moreover it does not support detecting when you go into Break mode.

    What I ended up using in the end was the EbMode function exported from vba6.dll and just polling that regularly to detect changes in the IDE state. Thanks for the input though, I'm sure it'll be useful to some people.

  40. #40
    PowerPoster
    Join Date
    Jun 2013
    Posts
    4,923

    Re: Modernizing the VB6 IDE

    Quote Originally Posted by LinkFX View Post
    do you have any ideas for replacing those 3 toolbar buttons?
    Can't really see the problem...
    If you cannot reach the "internals" of that ToolBar (or ToolBar-like) thingy -
    but "have" a hWnd for that "TargetStripe" - then the easiest way probably is:
    - to create your own (drawable) Overlay-hWnd (e.g. a VB.PictureBox)
    - resizing it to the same size as the "target"
    - then placing this OverlayHwnd on the target via SetParent
    - but setting your Overlay-hWnd into Disabled-State

    The last point above will allow "all MouseClicks to go through to the ParentHwnd...

    I don't have the time to fiddle with an Addin-Project-Type now (to give a concrete Demo),
    but the following might be sufficient to give you an idea, what I mean...

    Into a Form (Form shall contain virginal: Picture1 and ToolBar1 from the MS-CC-V6)
    Code:
    Option Explicit
    
    Private Declare Function SetParent Lib "user32" (ByVal hWndChild As Long, ByVal hWndNewParent As Long) As Long
    
    Private Sub Form_Load()
      Picture1.BorderStyle = 0
      Picture1.AutoRedraw = True
      Picture1.Enabled = False
      
      With Toolbar1
       .Buttons.Add(1, "Btn1", "Btn1").ToolTipText = "Btn1"
       .Buttons.Add(2, "Btn2", "Btn2").ToolTipText = "Btn2"
       .Buttons.Add 3, "Sep1", , tbrSeparator
       .Buttons.Add(4, "Btn3", "Btn3").ToolTipText = "Btn3"
      
       Picture1.Move 0, 0, Toolbar1.Width, Toolbar1.Height
       SetParent Picture1.hWnd, .hWnd
      End With
    End Sub
     
    Private Sub Toolbar1_ButtonClick(ByVal Button As MSComctlLib.Button)
      Me.Caption = Button.Key
    End Sub
    
    Private Sub Toolbar1_MouseMove(Button As Integer, Shift As Integer, x As Single, y As Single)
      Dim Btn As Button
      For Each Btn In Toolbar1.Buttons
        If x > Btn.Left And x < Btn.Left + Btn.Width And Btn.Visible And Btn.Style <> tbrSeparator Then
          Picture1.Cls: Picture1.Line (Btn.Left, Btn.Top)-(Btn.Left + Btn.Width, Btn.Top + Btn.Height), vbRed, B
        End If
      Next
    End Sub
    HTH

    Olaf

Page 1 of 5 1234 ... LastLast

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