Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.basic.visual.misc > #371

Re: Overriding Windows display settings - vb6

From "Mike Williams" <Mike@WhiskyAndCoke.com>
Newsgroups comp.lang.basic.visual.misc
Subject Re: Overriding Windows display settings - vb6
Date 2011-08-16 14:01 +0100
Organization A noiseless patient Spider
Message-ID <j2dpmj$ac$1@dont-email.me> (permalink)
References (4 earlier) <jKP1q.161371$Z04.100311@newsfe07.ams2> <j29iki$7lt$1@dont-email.me> <j29non$8ni$1@dont-email.me> <j2b72v$thu$1@speranza.aioe.org> <j2bc66$tie$1@dont-email.me>

Show all headers | View raw


"GS" <gs@somewhere.net> wrote in message news:j2bc66$tie$1@dont-email.me...
>> Nobody submitted this idea :
>> He already explained how to add the manifest in his first response.
>
> Thanks! I missed reading that one...

Just one final note regarding the required modification of the manifest 
which I mentioned in my first response in this thread. Personally I have had 
limited success with some manifests when the manifest file accompanies the 
compiled exe file. I've had times when the manifest clearly does not work, 
even after making sure that it is named correctly and that it lives in the 
same folder as the exe. This problem can often (but not always) be fixed 
simply by creating a new folder and then by copying both the exe file and 
the manifest file together into the new folder. It sounds rather weird I 
know because clearly the content of the files themselves is not changed 
during a simple copy process, and the only thing I can think of, which is 
just a wild guess, is that the Windows Explorer extended file properties are 
changed by this behaviour, for some reason causing the copies to work even 
though the original did not. Anyway, there is no point in spending time on 
trying to solve that problem because you can instead embed the manifest into 
the exe. So far, in all the various tests I have carried out, the suitably 
modified MMM dpiAware embedded manifest works fine.

I don't actually know how to correctly embed a manifest into an exe myself 
(maybe someone else here does?) but the MMM program which I mentioned and 
which you can get from http://mmm4vb6.atom5.com/ can do it if you click the 
appropriate checkbox. The only problem is, as I mentioned in my first 
response, the DPI Aware section in the MMM produced manifest does not work 
reliably or at all in Windows7 as it stands and needs to be modified in the 
way I have already explained. The data used by MMM is in a resource file and 
so before you can use MMM to create and embed a modified manifest into your 
compiled exe you need to edit the resource file. Fortunately the author, 
Robert Riemersma, has released the source code for MMM and has granted a 
licence which will clearly allow you to make changes to it for your own use. 
If you open up the MMM VB project, and if you have the VB6 Resource Editor 
Add-In enabled, you will see that the resource file contains about ten 
resource items and if you look in the MMM Res folder you will see ten .txt 
files which match them. You need to manually edit and save the 
manifest.apphead.txt file and the manifest.dpiaware.txt file so that 
together they will produce the suitably modified manifest. Then you need to 
click the Add Custom Resource button in the VB6 Resource editor and load in 
the modified manifest.apphead.txt file from the MMM Res folder. Then right 
click the existing APPHEAD resource item and delete it and right click the 
newly additem item in the Resource Editor and select Properties and set its 
Type to "TEXT" (including the quotes) and its ID to "APPHEAD" (including the 
quotes) and its language to English (United States). Then carry out a 
similar process to add the modified the dpiaware.txt file, using the Type 
"TEXT" and the ID "DPIAWARE" and the language English (United States). 
Finally compile MMM so that it overwrites the existing MMM.exe file.

When you run the modified MMM.exe file on your first test project make sure 
you place a tick in the Include dpiAware checkbox but that you do /not/ 
place a tick in the Embed Manifest Into EXE checkbox. This will enable you 
to use NotePad to examine the manifest file so that you can make sure you 
carried out the above process properly and that it actually does produce the 
correctly modified manifest file. Thereafter you should make sure that you 
do place a tick in the Embed Manifest Into EXE checkbox.

Mike



Back to comp.lang.basic.visual.misc | Previous | NextPrevious in thread | Next in thread | Find similar


Thread

Overriding Windows display settings - vb6 Brigand <markashall@hotmail.com> - 2011-08-12 12:01 -0700
  Re: Overriding Windows display settings - vb6 "Mike Williams" <Mike@WhiskyAndCoke.com> - 2011-08-12 21:23 +0100
    Re: Overriding Windows display settings - vb6 "Ivar" <ivar.ekstromer000@ntlworld.com> - 2011-08-14 11:33 +0100
      Re: Overriding Windows display settings - vb6 "Mike Williams" <Mike@WhiskyAndCoke.com> - 2011-08-14 13:30 +0100
        Re: Overriding Windows display settings - vb6 "Ivar" <ivar.ekstromer000@ntlworld.com> - 2011-08-14 14:06 +0100
          Re: Overriding Windows display settings - vb6 "Mike Williams" <Mike@WhiskyAndCoke.com> - 2011-08-14 23:36 +0100
            Re: Overriding Windows display settings - vb6 GS <gs@somewhere.net> - 2011-08-14 20:03 -0400
              Re: Overriding Windows display settings - vb6 "Nobody" <nobody@nobody.com> - 2011-08-15 09:30 -0400
                Re: Overriding Windows display settings - vb6 GS <gs@somewhere.net> - 2011-08-15 10:58 -0400
                Re: Overriding Windows display settings - vb6 Brigand <markashall@hotmail.com> - 2011-08-16 05:42 -0700
                Re: Overriding Windows display settings - vb6 "Mike Williams" <Mike@WhiskyAndCoke.com> - 2011-08-16 14:01 +0100
                Re: Overriding Windows display settings - vb6 -mhd <not_real@invalid.com> - 2011-08-16 15:04 -0400
                Re: Overriding Windows display settings - vb6 "Mike Williams" <Mike@WhiskyAndCoke.com> - 2011-08-16 22:02 +0100
            Re: Overriding Windows display settings - vb6 Tony Toews <ttoews@telusplanet.net> - 2011-08-19 15:34 -0600
  Re: Overriding Windows display settings - vb6 "Mike Williams" <Mike@WhiskyAndCoke.com> - 2011-08-13 15:27 +0100
  Re: Overriding Windows display settings - vb6 Deanna Earley <dee.earley@icode.co.uk> - 2011-08-23 15:05 +0100
    Re: Overriding Windows display settings - vb6 "Mike Williams" <Mike@WhiskyAndCoke.com> - 2011-08-26 17:48 +0100
      Re: Overriding Windows display settings - vb6 ralph <nt_consulting64@yahoo.net> - 2011-08-26 22:06 -0500
        Re: Overriding Windows display settings - vb6 -mhd <not_real@invalid.com> - 2011-08-27 11:58 -0400
          Re: Overriding Windows display settings - vb6 Dr J R Stockton <reply1134@merlyn.demon.co.uk> - 2011-08-28 18:48 +0100
      Re: Overriding Windows display settings - vb6 Schmidt <sss@online.de> - 2011-08-27 19:23 +0200
        Re: Overriding Windows display settings - vb6 ralph <nt_consulting64@yahoo.net> - 2011-08-27 16:56 -0500
          Re: Overriding Windows display settings - vb6 Schmidt <sss@online.de> - 2011-08-28 01:33 +0200

csiph-web