... There Is Another!

Another new MMM beta release, that is.

I never expected to be doing this, but within just a very short time of posting my previous entry here on MMM and DPI Awareness my old buddy Jeff Smith (of Aunt Belle's) called and gave me an earfull.

Better than just telling me how "full of it" I am, Jeff had test cases and a solution!

 

So I'm posting an 0.10 beta version with full source, and this will probably be the "final final" MMM release.  For those who have already forked 0.9 Final with your own improvements, there is only one change: the resource DPIAWARE was replaced and MMM was recompiled.

The new package contains the updated resource file and a compiled version of MMM.  The importable text file stored as DPIAWARE is: MMM 0-10\Res\manifest.dpiaware.txt

  <application xmlns:asmv3="urn:schemas-microsoft-com:asm.v3">
    <asmv3:windowsSettings xmlns="http://schemas.microsoft.com/SMI/2005/WindowsSettings">
      <dpiAware>true</dpiAware>
    </asmv3:windowsSettings>
  </application>

Hopefully this cures any other DPI-related woes people have been having when using MMM's DPI Awareness option when creating application manifests.

Thanks again, Jeff.  And apologies to the VB6 community.  Keep up the good fight!

 

Be careful with this, I did not have a chance to do exhaustive testing and may have broken something else or somehow screwed up the build:

MMM-0-10-FINAL-src.zip

I will try to keep this up for at least a year after this date.

I'll be the first, thank you so much for this! I just wish I would have known about it years ago!

Posted by CrazyDood on Saturday, November 5, 2011 11:58 AM

You're welcome. I wish I had the time to polish it further but I'm too busy at things that pay the bills now.

Posted by BVOCS on Tuesday, November 22, 2011 08:49 PM

Your project is very useful, so I took the liberty to add some improvements:

1. You can load a new project without closing MMM
2. Recent files (projects) in the menu and toolbar
3. Add multiple files at once (Multiselect, only for the module: Files added no-code)
4. Drag & Drop multiple files (only for the module: Files added no-code)
5. Contextual help file (CHM)
6. Added some classes and modules
7. Added a config.ini file to improve the user settings
8. You can open the project in VB6.0 IDE VBP (new Tools menu)
9. You can open the VBP file with Notepad (new Tools menu)
10. You can open the folder of the VBP project (new Tools menu)
11. other minor improvements

If you think it is interesting to contact me and I send you the modified project.

Regards.

Posted by gibra on Saturday, November 26, 2011 07:01 PM

Sounds nice. I'm not interested because I don't use it much anymore, but I'm sure others would be. Have you posted it anywhere?

Posted by BVOCS on Thursday, December 8, 2011 03:04 PM

I am a little surprised at your rather caustic comments on Fri 28 Oct and Thu 27 Oct 2011 regarding dpi awareness. I had actually informed you about this problem and about a fix for it months ago (as can be seen in the April 2011 archive). I see that you have now produced your own fix in a slightly different way, which is fine of course and I can confirm that it works, but your caustic comments still surprise me. My own posts on your web page were polite and intended to be helpful and I don't know where you are getting all this stuff from about people 'whinging' about it and 'telling you how full of it you are'. Maybe that is coming from somewhere else that I cannot see on your site.

I'm also surprised to hear you say that you do not believe that it was an actual reproducible problem when it very clearly was. You did ask me whether my own suggested fix worked for Vista and Win7 and I told you that it did, and I even mentioned the two schema properties in one tag thing regarding very early version of WinXP, but you did not even once ask me to show you how to reproduce the dpi aware problem so I assumed you could already do that yourself. The simple line of code 'MsgBox Me.ScaleX(1, vbInches, vbPixels)', or any suitable API alternative, will do it for you. If you run that code in a VB compiled exe using a version 0.9 or earlier manifest where you have selected dpi awareness and if you run it on a machine running at (for example) 150% DPI scale where there is NO tick in the box 'Use WinXP dpi scaling' and where the Aero desktop is in its normal enabled state then you will find that it wrongly reports 96 dpi even though the machine is running at 144 dpi.

. . . continued overleaf ;-)

Posted by Mike Williams on Tuesday, February 21, 2012 07:23 AM

. . . episode two ;-)

I'm also not sure where you are getting this 'make sure you idiots don't declare dpi awareness unless your project actually is dpi aware' stuff from (again unless it is coming from somewhere that I cannot see on your web page). I certainly would not declare a program to be dpi aware unless I actually did write that program in such a fashion. It is not the dpi awareness itself that was the problem, but rather the declaration of it and the fact that in versions 0.9 and earlier the manifest declaration of dpi awareness did not actually work and the system ignored it, causing various problems including fuzzy text in Labels, Command Buttons, Text Boxes, Menus (in fact everywhere) and other things on such machines even if the VB program it was applied to was written in a fully dpi aware fashion.

Incidentally, a simple standard vanilla VB project /is/ dpi aware, or at least it is partially dpi aware in that your compiled VB6 exe will automatically attempt to size the client area of your Form in accordance with the target system's dpi setting (which of course it will succeed in doing only if this results in a Form that is not too large for the screen) and it will always succeed in drawing your Form's controls at sizes and positions which take into account the target system's dpi setting, whether it succeeded with the Form's client area or not. In fact it is this 'partial' dpi awareness that causes most problems, causing invisible 'off the edge of the Form' controls and other problems that need to be taken into account in your code.

Anyway, now that I've had my own little rant let me thank you for producing a new version in which you have fixed the dpi awareness problem.

/rant over ;-)

Mike

Posted by Mike Williams on Tuesday, February 21, 2012 07:24 AM

Further to my previous two posts, the set dpi aware section of the latest MMM version 1.0 works fine on Vista and on Windows 7 but it fails on both of my XP machines (one is a copy of XP running in a virtual machine in Vista and the other is a full installation of XP including SP3 on my laptop. In both cases my programs fail to start (whether the manifest is a separate file or is embedded into the exe). The Windows error message is "This application has failed to start because the application configuration is incorrect". This is in the latest version 1.0 of MMM. Version 0.9 of MMM when modified to include my own suggested dpi modification (see the April 2011 archive) works fine on Vista, Windows 7 and XP).

Mike

Posted by Mike Williams on Monday, February 27, 2012 01:10 PM

Yes, the XP problem has been brought to my attention by the guy who made the 0.10 changes. He's been using a version with the changes in it. When I get around to it I may post an 0.11 version with this in it.

You aren't the only person with DPI-related concerns though, so don't think any remarks I've made were directed at you. I'm sorry if you felt that way.

Note that there has never been a "release" version of MMM, it's all been beta code. There is just too much left undone in it. I'm sure somebody could take the ideas and perhaps some of the code and create a more finished product.

Keep in mind that MMM is an outgrowth of tools developed for in-house use. I was just trying to find a way to get rid of any proprietary code so I could offer the program to the VB community in a usable form. As I moved away from VB myself I dropped any plans to "productize" it, i.e. turn it into something more robust.

That's really the only reason for this little blog: to try to get MMM into the hands of VBers.

Posted by BVOCS on Tuesday, March 6, 2012 11:11 AM

I downloaded the ZIP archive and scanned it. No virus seen here, I'm not sure what to say except that people should always scan anything they download and then go from there using their own best judgement.

Posted by BVOCS on Thursday, December 6, 2012 07:22 PM

Post a comment

  • Name:
  • E-Mail Address (optional):
  • URL (nofollow, optional):
  • Remember personal info
  • Comments (text only):