Results 1 to 30 of 30

Thread: Win10 AppCompat VB6 IDE

  1. #1

    Thread Starter
    PowerPoster
    Join Date
    Feb 2006
    Posts
    24,482

    Lightbulb Win10 AppCompat VB6 IDE

    Since there is no code here, this didn't seem to make sense for the CodeBank. It is only of interest to VB6 programmers so General Discussions didn't seem to fit either.


    Once people get VB6 installed they often struggle with the little tweaks required. Often people will use one of the Windows Version Compatibility Modes, but those have undesirable shims bundled into them such as version-lies.

    I realize that few VB6 programmers have installed or used the Application Compatibility Toolkit, so I thought I'd post a custom Shim Database (.sdb) file. I have included two versions, but one pattern-matches on a specific patch level and will become obsolete as Microsoft releases VB6.exe patches (which do actually still occur though rarely):

    Name:  VB6 Capture orig.png
Views: 4912
Size:  11.2 KB

    Original

    Because of that I've included a less restrictive version as well. Sadly there is no support for wild-carding in versioning values so it might also match another program, but the risk is probably quite low:

    Name:  VB6 Capture.png
Views: 4836
Size:  8.4 KB

    Less restrictive

    That's the one you'd want to use. The attachment includes Install.cmd and Uninstall.cmd for that one.

    To run the install you can right-click and Run as administrator and that's all there is to it. You can even do that before installing VB6 itself.


    It seems to work fine in Windows 10 (Threshold 2, i.e. current level of patches to Windows 10) though I can't say regarding Windows 10 after the Redstone "Anniversary Update" patches coming in August 2016.

    This set of shims addresses the DWM issues that can cause Designer-drag lagging in the IDE. Weirdly enough, you get a red rubberband when stretching, sizing, etc. but it works just fine. It also has RunAsAdmin.

    I was a little doubtful about the HighDpiAware shim, but it seems ok so far.

    This has been working great for me. It might also work unchanged for Windows 8.1, Windows 8, and even Windows 7 for all I know.

    Avoiding the version-lie shims means you have access to APIs and ActiveX components you'd be denied otherwise. Of course for some you'll still need a manifest embedded into VB6.exe to get Common Controls 6.x access and you may also want to add <supportedOS /> elements as well for full access to new APIs. But the application manifest for VB6.exe is another topic.
    Attached Files Attached Files

  2. #2

    Thread Starter
    PowerPoster
    Join Date
    Feb 2006
    Posts
    24,482

    Re: Win10 AppCompat VB6 IDE

    As far as I can tell what this changes in the registry looks like:

    Code:
    [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\InstalledSDB\{fbc6500a-a183-415c-9aa5-f67b9c1536a7}]
    "DatabasePath"="C:\\Windows\\AppPatch\\Custom\\{fbc6500a-a183-415c-9aa5-f67b9c1536a7}.sdb"
    "DatabaseType"=dword:00010000
    "DatabaseDescription"="VB6 shims"
    "DatabaseInstallTimeStamp"=hex(b):fc,2f,54,19,81,e9,d1,01
    
    [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Custom\VB6.EXE]
    "{fbc6500a-a183-415c-9aa5-f67b9c1536a7}.sdb"=hex(b):fc,2f,54,19,81,e9,d1,01

  3. #3

    Thread Starter
    PowerPoster
    Join Date
    Feb 2006
    Posts
    24,482

    Re: Win10 AppCompat VB6 IDE

    There is nothing executable there so no reason to censor it any more than an image file.

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

    Re: Win10 AppCompat VB6 IDE

    Quote Originally Posted by Elroy View Post
    Since, strictly speaking, your attachments aren't ASCII/ANSI files, I'll be surprised if the moderators let it stand.
    We do allow a variety of non-ascii files (such as Excel based files), but some need to be zipped first as we do not have them specified in the allowed list of the forum software (there are a variety of reasons for that, such as file size, and the fact we don't want to manage the list frequently).

    While I haven't opened the .sdb files in a proper viewer, they seem fine after a quick check in Notepad.

    Given dilettante's long history here, and the high moral standards he has shown, it is safe to assume the attachment will not be removed by moderators unless we are given a good reason to do so.

  5. #5

    Thread Starter
    PowerPoster
    Join Date
    Feb 2006
    Posts
    24,482

    Re: Win10 AppCompat VB6 IDE

    Thanks for the vote of confidence. The .SDB files should be viewable using almost any version of the ACT's Compatibility Administrator tool. I'm not sure what format they're in and may be a simple ESENT database or something.

  6. #6
    Fanatic Member
    Join Date
    Jan 2006
    Posts
    557

    Re: Win10 AppCompat VB6 IDE

    Quote Originally Posted by si_the_geek View Post
    Given dilettante's long history here, and the high moral standards he has shown...
    More catholic than that, Pope Francis would be out of a job

  7. #7

    Thread Starter
    PowerPoster
    Join Date
    Feb 2006
    Posts
    24,482

    Re: Win10 AppCompat VB6 IDE

    I'm starting to worry about being awarded a gold-tone Dollar Store pocket watch (As Seen on TV!) and nudged out the door to pasture.

  8. #8

    Thread Starter
    PowerPoster
    Join Date
    Feb 2006
    Posts
    24,482

    Re: Win10 AppCompat VB6 IDE

    Not directly related but easily forgotten when reinstalling on a fresh Win10 system:

    If you normally use the IDE in MDI mode, opening a Project with windows maximized can be handy. I know I'm used to it and missed it.


    Make a file called something like VB Open Maximized.reg and paste in:

    Code:
    Windows Registry Editor Version 5.00
    
    [HKEY_CURRENT_USER\Software\Microsoft\Visual Basic\6.0]
    "MDIMaximized"="1"
    Then you can right-click and choose Merge.

  9. #9

    Thread Starter
    PowerPoster
    Join Date
    Feb 2006
    Posts
    24,482

    Re: Win10 AppCompat VB6 IDE

    Well I have found a glitch in that .SDB for VB6.exe:

    When you multi-select several controls in the Form designer (probably UserControl as well) you select them and can drag the group... but this multi-selection isn't visually indicated.

    In other words it looks like you haven't selected any of them. Normally you get a box around them but it isn't appearing.


    This isn't major but it is worrying and less than adequate, and I'm sure we can do better. Perhaps it relates to the strange red rubberband line?

    I'll see if I can find a fix for that.

  10. #10
    Fanatic Member
    Join Date
    Apr 2015
    Location
    Finland
    Posts
    679

    Re: Win10 AppCompat VB6 IDE

    Quote Originally Posted by dilettante View Post
    When you multi-select several controls in the Form designer (probably UserControl as well) you select them and can drag the group... but this multi-selection isn't visually indicated.

    In other words it looks like you haven't selected any of them. Normally you get a box around them but it isn't appearing.
    Same behaviour as with common control 6.0 manifested ide (vb6.exe file). Selecting more than one control, the selection/selected indicators disappear altogether. Also in manifested ide form/control properties (back-, fore- etc.) color dialog 'palette', is shown as blank white.

  11. #11

    Thread Starter
    PowerPoster
    Join Date
    Feb 2006
    Posts
    24,482

    Re: Win10 AppCompat VB6 IDE

    Hmm, I know about the color dialog issue with a CC6 manifest applied to the IDE. I must have forgotten that it also causes multi-select to lose the indicators.

    This .SDB doesn't seem to result in the other problems we have with a CC6 manifest: things like the color dialog problem and Option buttons in a Frame being blacked out.

  12. #12

    Thread Starter
    PowerPoster
    Join Date
    Feb 2006
    Posts
    24,482

    Re: Win10 AppCompat VB6 IDE

    I still have not found a fix for the multi-selected controls indication. However I have eliminated a number of shims we don't need in this new version:

    Name:  VB6 Capture.png
Views: 4574
Size:  6.3 KB
    Attached Files Attached Files

  13. #13
    VB-aholic & Lovin' It LaVolpe's Avatar
    Join Date
    Oct 2007
    Location
    Beside Waldo
    Posts
    19,541

    Re: Win10 AppCompat VB6 IDE

    Quote Originally Posted by dilettante View Post
    Hmm, I know about the color dialog issue with a CC6 manifest applied to the IDE. I must have forgotten that it also causes multi-select to lose the indicators.
    Here's something I just discovered the other day regarding CC6 manifest and the IDE. Adding single character listbox/combobox items in the listbox/combobox property window fails. We get a square character instead (at least on Win10).
    Insomnia is just a byproduct of, "It can't be done"

    Classics Enthusiast? Here's my 1969 Mustang Mach I Fastback. Her sister '67 Coupe has been adopted

    Newbie? Novice? Bored? Spend a few minutes browsing the FAQ section of the forum.
    Read the HitchHiker's Guide to Getting Help on the Forums.
    Here is the list of TAGs you can use to format your posts
    Here are VB6 Help Files online


    {Alpha Image Control} {Memory Leak FAQ} {Unicode Open/Save Dialog} {Resource Image Viewer/Extractor}
    {VB and DPI Tutorial} {Manifest Creator} {UserControl Button Template} {stdPicture Render Usage}

  14. #14
    New Member
    Join Date
    Jun 2018
    Posts
    1

    Re: Win10 AppCompat VB6 IDE

    Quote Originally Posted by LaVolpe View Post
    Here's something I just discovered the other day regarding CC6 manifest and the IDE. Adding single character listbox/combobox items in the listbox/combobox property window fails. We get a square character instead (at least on Win10).
    For kindness The LaVolpe; how did you solve this unique character problem in the listbox?

  15. #15
    VB-aholic & Lovin' It LaVolpe's Avatar
    Join Date
    Oct 2007
    Location
    Beside Waldo
    Posts
    19,541

    Re: Win10 AppCompat VB6 IDE

    Quote Originally Posted by schmitz View Post
    For kindness The LaVolpe; how did you solve this unique character problem in the listbox?
    Simply populate the listbox in Form_Load, i.e., List1.AddItem "C"
    Insomnia is just a byproduct of, "It can't be done"

    Classics Enthusiast? Here's my 1969 Mustang Mach I Fastback. Her sister '67 Coupe has been adopted

    Newbie? Novice? Bored? Spend a few minutes browsing the FAQ section of the forum.
    Read the HitchHiker's Guide to Getting Help on the Forums.
    Here is the list of TAGs you can use to format your posts
    Here are VB6 Help Files online


    {Alpha Image Control} {Memory Leak FAQ} {Unicode Open/Save Dialog} {Resource Image Viewer/Extractor}
    {VB and DPI Tutorial} {Manifest Creator} {UserControl Button Template} {stdPicture Render Usage}

  16. #16
    New Member
    Join Date
    Jun 2020
    Posts
    2

    Thumbs up Re: Win10 AppCompat VB6 IDE

    Hello,

    I've tested with that settings:

    Attachment 177549

    I've windows 10 64 bits Pro version 10.0.18363.836 Spanish version.
    And it works for me.
    Thanks to your settings I've solved my problems with the control movement in the IDE.
    In my computer there is no need to the "Run as admin" setting enabled.

    Thank you

    Quote Originally Posted by dilettante View Post
    Since there is no code here, this didn't seem to make sense for the CodeBank. It is only of interest to VB6 programmers so General Discussions didn't seem to fit either.


    Once people get VB6 installed they often struggle with the little tweaks required. Often people will use one of the Windows Version Compatibility Modes, but those have undesirable shims bundled into them such as version-lies.

    I realize that few VB6 programmers have installed or used the Application Compatibility Toolkit, so I thought I'd post a custom Shim Database (.sdb) file. I have included two versions, but one pattern-matches on a specific patch level and will become obsolete as Microsoft releases VB6.exe patches (which do actually still occur though rarely):

    Name:  VB6 Capture orig.png
Views: 4912
Size:  11.2 KB

    Original

    Because of that I've included a less restrictive version as well. Sadly there is no support for wild-carding in versioning values so it might also match another program, but the risk is probably quite low:

    Name:  VB6 Capture.png
Views: 4836
Size:  8.4 KB

    Less restrictive

    That's the one you'd want to use. The attachment includes Install.cmd and Uninstall.cmd for that one.

    To run the install you can right-click and Run as administrator and that's all there is to it. You can even do that before installing VB6 itself.


    It seems to work fine in Windows 10 (Threshold 2, i.e. current level of patches to Windows 10) though I can't say regarding Windows 10 after the Redstone "Anniversary Update" patches coming in August 2016.

    This set of shims addresses the DWM issues that can cause Designer-drag lagging in the IDE. Weirdly enough, you get a red rubberband when stretching, sizing, etc. but it works just fine. It also has RunAsAdmin.

    I was a little doubtful about the HighDpiAware shim, but it seems ok so far.

    This has been working great for me. It might also work unchanged for Windows 8.1, Windows 8, and even Windows 7 for all I know.

    Avoiding the version-lie shims means you have access to APIs and ActiveX components you'd be denied otherwise. Of course for some you'll still need a manifest embedded into VB6.exe to get Common Controls 6.x access and you may also want to add <supportedOS /> elements as well for full access to new APIs. But the application manifest for VB6.exe is another topic.

  17. #17
    Fanatic Member Episcopal's Avatar
    Join Date
    Mar 2019
    Location
    Brazil
    Posts
    547

    Re: Win10 AppCompat VB6 IDE

    Attachment 177549
    hummmm, broken link

  18. #18
    New Member
    Join Date
    Jun 2020
    Posts
    2

    Re: Win10 AppCompat VB6 IDE

    Quote Originally Posted by Episcopal View Post
    hummmm, broken link
    This is the screen of the broken link:

    Attachment 177924

  19. #19
    Fanatic Member Episcopal's Avatar
    Join Date
    Mar 2019
    Location
    Brazil
    Posts
    547

    Re: Win10 AppCompat VB6 IDE

    Quote Originally Posted by david.hernandez View Post
    This is the screen of the broken link:

    Attachment 177924
    I'm sorry ... but this one is also broken .... or there is an error here for me.

  20. #20
    Frenzied Member
    Join Date
    Oct 2008
    Posts
    1,181

    Re: Win10 AppCompat VB6 IDE

    Quote Originally Posted by dilettante View Post
    Since there is no code here, this didn't seem to make sense for the CodeBank. It is only of interest to VB6 programmers so General Discussions didn't seem to fit either.


    Once people get VB6 installed they often struggle with the little tweaks required. Often people will use one of the Windows Version Compatibility Modes, but those have undesirable shims bundled into them such as version-lies.

    I realize that few VB6 programmers have installed or used the Application Compatibility Toolkit, so I thought I'd post a custom Shim Database (.sdb) file. I have included two versions, but one pattern-matches on a specific patch level and will become obsolete as Microsoft releases VB6.exe patches (which do actually still occur though rarely):

    Name:  VB6 Capture orig.png
Views: 4912
Size:  11.2 KB

    Original

    Because of that I've included a less restrictive version as well. Sadly there is no support for wild-carding in versioning values so it might also match another program, but the risk is probably quite low:

    Name:  VB6 Capture.png
Views: 4836
Size:  8.4 KB

    Less restrictive

    That's the one you'd want to use. The attachment includes Install.cmd and Uninstall.cmd for that one.

    To run the install you can right-click and Run as administrator and that's all there is to it. You can even do that before installing VB6 itself.


    It seems to work fine in Windows 10 (Threshold 2, i.e. current level of patches to Windows 10) though I can't say regarding Windows 10 after the Redstone "Anniversary Update" patches coming in August 2016.

    This set of shims addresses the DWM issues that can cause Designer-drag lagging in the IDE. Weirdly enough, you get a red rubberband when stretching, sizing, etc. but it works just fine. It also has RunAsAdmin.

    I was a little doubtful about the HighDpiAware shim, but it seems ok so far.

    This has been working great for me. It might also work unchanged for Windows 8.1, Windows 8, and even Windows 7 for all I know.

    Avoiding the version-lie shims means you have access to APIs and ActiveX components you'd be denied otherwise. Of course for some you'll still need a manifest embedded into VB6.exe to get Common Controls 6.x access and you may also want to add <supportedOS /> elements as well for full access to new APIs. But the application manifest for VB6.exe is another topic.

    I would actually be interested in installing the Application Compatibility Toolkit myself. Can you provide instructions on where to download it from, and how to use it to make VB6 work correctly in Windows 10?

  21. #21

    Thread Starter
    PowerPoster
    Join Date
    Feb 2006
    Posts
    24,482

    Re: Win10 AppCompat VB6 IDE

    As Microsoft continues to crumble under the weight of its decisions things are beginning to disappear.

    Application Compatibility Toolkit (ACT)

    ⓘ Important

    The Application Compatibility Toolkit versions covered in this article are no longer supported. The last supported version is included in the Windows 10 Assessment and Deployment Kit

  22. #22
    Fanatic Member
    Join Date
    Oct 2005
    Posts
    558

    Re: Win10 AppCompat VB6 IDE

    In no way do I want to cast aspersions on the excellent work here but my VB becomes unusable after installing the files. Installing the file fixes problems when opening external documents with VB6. Sadly the toolbox icons become microscopic. Fonts in the VB IDE are so small as to be unusable. You can bump up the code window to be usable but basically this breaks VB badly. My screen is very high resolution so that probably won't be the experience of others. Thanks for including the uninstall option and I certainly thank you for all your hard work.

  23. #23

    Thread Starter
    PowerPoster
    Join Date
    Feb 2006
    Posts
    24,482

    Re: Win10 AppCompat VB6 IDE

    The HighDpiAware shim tells Windows "don't apply appcompat scaling, this program will address high DI settings itself." Of course this isn't magic. It does not cause VB6.EXE to scale its UI for high DPI because VB6.EXE itself is not actually DPI aware. That shim just lets you test VB6 programs that are written to be high DPI aware.

    If you have a monitor with gratuitously high resolution of course everything will look "small." That's how the whole thing works. Dots are set closer together. If your monitor has very high resolution then the "small" stuff may be far to small to see unless the monitor is physically very large.

    So ideally for development you'd use a monitor that can by viewed comfortably at 100% scaling (96dpi).


    Alternatively you'll have to use one of the forms of DPI scaling appcompat instead of marking VB6.EXE as DPI aware.

    Things have changed since this thread was started.

    You could omit the HighDPIAware shim and try replacing it with the newer GdiDPIScaling shim as long as you have updated Windows 10 to that level of support (1703 or later). Of course making a new SDB requires the Compatibility Administrator utility from the Application Compatibility Toolkit.

    You could also omit the HighDPIAware shim in a new SDB and then request GDI Scaling via the Explorer Properties dialog. There it is labeled "System (Enhanced)." But if you are going to apply an SDB anyway you may as well specify it there.

  24. #24

    Thread Starter
    PowerPoster
    Join Date
    Feb 2006
    Posts
    24,482

    Re: Win10 AppCompat VB6 IDE

    I just tried the GdiDPIScaling shim with VB6.EXE and the results were usable though a little grim. Most of the control toolbox bitmaps and some of the toolbar bitmaps must be DIBs because they didn't get scaled well... while other bitmaps scaled but were blocky and maybe pixelated. The ugly bitmaps are ok, but the poorly scaled ones got cut off with only a chunk of their upper-left pixels showing.

    So yeah, it can be used but the limitations of GDI Scaling were pretty obvious.

    Another downside is that working that way you can't really develop DPI-aware programs. You could try working this way and mark all of your applications to request GDI Scaling via manifests, but the results will probably still vary a lot for different displays at various DPI settings. But if you try to deal with high DPI at all you have a lot of testing and tweaking to do.

    So I still think you need to develop on a 96dpi display.

  25. #25
    PowerPoster
    Join Date
    Jul 2010
    Location
    NYC
    Posts
    5,651

    Re: Win10 AppCompat VB6 IDE

    Is there any way to modify the shim so the icons aren't so ridiculously tiny on zoomed monitors without the GdiDPIScaling mentioned in the post above since it apparently makes things look terrible? Using the 'Windows XP SP3' compat it looked fine, but I wanted the other benefits of using the shim here.

    Here's the before and after, needless to say this isn't really usable.


  26. #26

    Thread Starter
    PowerPoster
    Join Date
    Feb 2006
    Posts
    24,482

    Re: Win10 AppCompat VB6 IDE

    The shims are part of Windows. You can't really "modify" them, you can only select them or not. The actions and effects they result in occurs within called Windows library entrypoints.

    Your "compatibility modes" are just varying bags of shim selections in addition to one of the "version lie" shims.

    You can try digging into this by using the Compatibility Administrator utility in the Application Compatibility Toolkit. I'm not sure where they bundled all of this but there isn't a separate download for it any more.

    Ahh:

    Important

    The Application Compatibility Toolkit versions covered in this article are no longer supported. The last supported version is included in the Windows 10 Assessment and Deployment Kit.

  27. #27
    PowerPoster
    Join Date
    Jul 2010
    Location
    NYC
    Posts
    5,651

    Re: Win10 AppCompat VB6 IDE

    I was asking about modifying the file you posted, not the system shim. I have the ACT though and think I figured it out; I can just remove the HighDpiAware option. In addition to the tiny icons it breaks all apps that aren't doing manual dpi adjustments of API-created controls (they're way too big and cover up VB UI elements).

    The Compatibility Administrator displays but doesn't let you edit the system ones.
    Last edited by fafalone; Mar 10th, 2023 at 02:56 AM.

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

    Re: Win10 AppCompat VB6 IDE

    Fafalone, using any of the compatibility (full shim bundle) packages breaks calls to the ShellExecute API, and who knows what else. Personally, I think it's highly advisable to use a minimal set of shims.
    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.

  29. #29

    Thread Starter
    PowerPoster
    Join Date
    Feb 2006
    Posts
    24,482

    Re: Win10 AppCompat VB6 IDE

    Early on in the DPI Battle I saw where things were going. I quit fighting and bought a 20" 1600x900 monitor and made it the primary for my development PC.

    This is quite usable at 96 DPI and solved nearly all of my issues. To test at high DPI settings I generally rely on a secondary monitor and separate test PCs. In some cases I hard-code Forms to open on a secondary high-res high DPI monitor for debugging and then omit that in subsequent compiles.

    I'm not sure any amount of jiggering beats developing at 96 DPI.

  30. #30
    PowerPoster
    Join Date
    Jul 2010
    Location
    NYC
    Posts
    5,651

    Re: Win10 AppCompat VB6 IDE

    I never use ShellExecute... it doesn't break ShellExecuteEx. But I've been using the SP3 Compat bundle since like 2010 until I switched to this today; maybe it's responsible for the rare, hard to reproduce crashes I sometimes get from the IDE while running complex programs, but generally it's been fine.


    I don't have a separate development machine from my main computer I use for everything else, and anyway more and more people have scaled displays and it's only become more common. I've got a couple laptops without scaling I use for testing 96dpi. Everything turns out fine when you develop for 96dpi and leave your apps dpi unaware, at least for every app I've made-- the system scaling works fine. It's only when you mark something dpi aware it breaks when running at e.g. 150% or 200% zoom.

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