Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

VB6 and Windows 7

26 views
Skip to first unread message

Trouble

unread,
Jan 29, 2010, 3:47:09 PM1/29/10
to
I maintain a number of technical apps in VB6. They have migrated to Vista
without difficulty. With Windows 7 my application has a labe in MS Sans Serif
24 pt "Plate Fin Single Phase". Surprisingly, W7 displays the lable "Plate
Fin Single Phase" in highly pixilated form, the pixels being as wide as the
characters so that curved letters like "P" are displayed as a series of boxes
joined corner to corner (Vista displays correctly).

Aside from that the app runs fine.

Any Thoughts?

MikeD

unread,
Jan 29, 2010, 7:34:43 PM1/29/10
to

"Trouble" <Tro...@discussions.microsoft.com> wrote in message
news:55E4F1BC-77F6-4D9B...@microsoft.com...

Use a different font?

--
Mike

Trouble

unread,
Jan 30, 2010, 2:11:01 PM1/30/10
to
That's a good idea Mike. The users are 1500 miles away. I just need to find a
Windows 7 machine around here to borrow and try it.

Thanks

"MikeD" wrote:

> .
>

mayayana

unread,
Jan 30, 2010, 3:09:10 PM1/30/10
to
> That's a good idea Mike. The users are 1500 miles away. I just need to
find a
> Windows 7 machine around here to borrow and try it.
>

If you can find a copy of the RC you can install it. The
RC version will run until March, then I think it runs
for 1 hour before quitting until June. It was available for
download from MS as a DVD ISO. I think that download
is now gone, but it may be elsewhere.
I've tried my own software on Win7 and not found
any issues, but I never use MS Sans Serif, either.


MikeD

unread,
Jan 30, 2010, 5:25:24 PM1/30/10
to
Do I detect a bit of sarcasm there? I thought it was good advice. If you
want to support later OSes, don't use ancient fonts. Yes, I know that MS
Sans Serif is the default font that VB uses. Change it. Chances are,
Windows 7 doesn't come with that specific font anymore, and so it's
substituting a font and making a "best guess". It's probably doing the best
it can. But since that font's not even a TrueType font, any "best guess" is
not likely to be good.

--
Mike


"Trouble" <Tro...@discussions.microsoft.com> wrote in message

news:A22E2568-8B39-4531...@microsoft.com...

MikeD

unread,
Jan 30, 2010, 5:31:13 PM1/30/10
to

"Trouble" <Tro...@discussions.microsoft.com> wrote in message

news:A22E2568-8B39-4531...@microsoft.com...


> That's a good idea Mike. The users are 1500 miles away. I just need to
> find a
> Windows 7 machine around here to borrow and try it.


Oh....and it's not mine or any one else's problem that you can't test your
app under Win7 for yourself. Do what mayayana said, and create a virtual
machine of Win7 so you can test.

--
Mike

Tony Toews [MVP]

unread,
Jan 31, 2010, 3:40:49 PM1/31/10
to
"MikeD" <nob...@nowhere.edu> wrote:

>Oh....and it's not mine or any one else's problem that you can't test your
>app under Win7 for yourself. Do what mayayana said, and create a virtual
>machine of Win7 so you can test.

While you're at it get a 64 bit system and start doing your testing
under 64 bit Win 7 because there's likely going to be slight problems
in that environment.

Tony
--
Tony Toews, Microsoft Access MVP
Tony's Main MS Access pages - http://www.granite.ab.ca/accsmstr.htm
Tony's Microsoft Access Blog - http://msmvps.com/blogs/access/
For a convenient utility to keep your users FEs and other files
updated see http://www.autofeupdater.com/
Granite Fleet Manager http://www.granitefleet.com/

Tony Toews [MVP]

unread,
Jan 31, 2010, 5:12:52 PM1/31/10
to
"Tony Toews [MVP]" <tto...@telusplanet.net> wrote:

>"MikeD" <nob...@nowhere.edu> wrote:
>
>>Oh....and it's not mine or any one else's problem that you can't test your
>>app under Win7 for yourself. Do what mayayana said, and create a virtual
>>machine of Win7 so you can test.
>
>While you're at it get a 64 bit system and start doing your testing
>under 64 bit Win 7 because there's likely going to be slight problems
>in that environment.

MikeD.

Sorry, I should've responded to the OP.

Dee Earley

unread,
Feb 1, 2010, 7:58:39 AM2/1/10
to
On 29/01/2010 20:47, Trouble wrote:
> I maintain a number of technical apps in VB6. They have migrated to Vista
> without difficulty. With Windows 7 my application has a labe in MS Sans Serif
> 24 pt "Plate Fin Single Phase". Surprisingly, W7 displays the lable "Plate
> Fin Single Phase" in highly pixilated form, the pixels being as wide as the
> characters so that curved letters like "P" are displayed as a series of boxes
> joined corner to corner (Vista displays correctly).

You should set the font (at runtime) to "MS Shell Dlg" which is then
mapped to the standard font in all (4+) versions windows.

If you set it at design time, it will either fail or use the mapped font
on your development system.

--
Dee Earley (dee.e...@icode.co.uk)
i-Catcher Development Team

iCode Systems

Karl E. Peterson

unread,
Feb 1, 2010, 8:33:32 PM2/1/10
to
After serious thinking Dee Earley wrote :

> On 29/01/2010 20:47, Trouble wrote:
>> I maintain a number of technical apps in VB6. They have migrated to Vista
>> without difficulty. With Windows 7 my application has a labe in MS Sans
>> Serif 24 pt "Plate Fin Single Phase". Surprisingly, W7 displays the lable
>> "Plate Fin Single Phase" in highly pixilated form, the pixels being as wide
>> as the characters so that curved letters like "P" are displayed as a series
>> of boxes joined corner to corner (Vista displays correctly).

Repro'd. Definitely an issue in Win7.

> You should set the font (at runtime) to "MS Shell Dlg" which is then mapped
> to the standard font in all (4+) versions windows.
>
> If you set it at design time, it will either fail or use the mapped font on
> your development system.

Whoa! I'd never heard of this before. It's like a miracle cure.
How'd you ever stumble upon that?

--
.NET: It's About Trust!
http://vfred.mvps.org


Dee Earley

unread,
Feb 2, 2010, 4:37:25 AM2/2/10
to

MSDN :)
(I think, it was many years ago)

Looking at the code it was a (heavily) modified sample to be able to
support Japanese localisation with different fonts needed for specific
user locales.

Dee Earley

unread,
Feb 2, 2010, 4:44:39 AM2/2/10
to
On 02/02/2010 09:37, Dee Earley wrote:
> On 02/02/2010 01:33, Karl E. Peterson wrote:
>> After serious thinking Dee Earley wrote :
>>> You should set the font (at runtime) to "MS Shell Dlg" which is then
>>> mapped to the standard font in all (4+) versions windows.
>>>
>>> If you set it at design time, it will either fail or use the mapped
>>> font on your development system.
>>
>> Whoa! I'd never heard of this before. It's like a miracle cure. How'd
>> you ever stumble upon that?
>
> MSDN :)
> (I think, it was many years ago)
>
> Looking at the code it was a (heavily) modified sample to be able to
> support Japanese localisation with different fonts needed for specific
> user locales.

Hmm, it doesn't mention "MS Shell Dlg" though:
http://msdn.microsoft.com/en-us/library/aa241713(VS.60).aspx

Also part of the VS6 MSDN:
<mk:@MSITStore:C:\Program%20Files\Visual%20Studio\MSDN98\98VSa\1033\vbcon98.chm::/Html/vbconfontdisplayprintconsiderationsindbcsenvironment.htm>

Karl E. Peterson

unread,
Feb 2, 2010, 8:09:14 PM2/2/10
to
Dee Earley pretended :

> On 02/02/2010 09:37, Dee Earley wrote:
>> On 02/02/2010 01:33, Karl E. Peterson wrote:
>>> After serious thinking Dee Earley wrote :
>>>> You should set the font (at runtime) to "MS Shell Dlg" which is then
>>>> mapped to the standard font in all (4+) versions windows.
>>>>
>>>> If you set it at design time, it will either fail or use the mapped
>>>> font on your development system.
>>>
>>> Whoa! I'd never heard of this before. It's like a miracle cure. How'd
>>> you ever stumble upon that?
>>
>> MSDN :)
>> (I think, it was many years ago)
>>
>> Looking at the code it was a (heavily) modified sample to be able to
>> support Japanese localisation with different fonts needed for specific
>> user locales.
>
> Hmm, it doesn't mention "MS Shell Dlg" though:
> http://msdn.microsoft.com/en-us/library/aa241713(VS.60).aspx

You *know* I hate those URLs! <g>

> Also part of the VS6 MSDN:
> <mk:@MSITStore:C:\Program%20Files\Visual%20Studio\MSDN98\98VSa\1033\vbcon98.chm::/Html/vbconfontdisplayprintconsiderationsindbcsenvironment.htm>

Yeah, I haven't seen it used as you suggest, well, anywhere! I even
googled around after that post. Someone took a helluva leap there to
get to that point, and they really stuck the landing. I haven't tried
it downlevel. But, now that I say that, hang on while I fire up a
Win95 VM... Huh. Nope, doesn't "work" there. No error, but I get the
same chunky font at 50pts as with just leaving it at Sans Serif. So,
where's this kick in then, at NT4?

Karl E. Peterson

unread,
Feb 2, 2010, 8:10:47 PM2/2/10
to
MikeD pretended :

> Do I detect a bit of sarcasm there? I thought it was good advice. If you
> want to support later OSes, don't use ancient fonts. Yes, I know that MS Sans
> Serif is the default font that VB uses. Change it. Chances are, Windows 7
> doesn't come with that specific font anymore, and so it's substituting a font
> and making a "best guess". It's probably doing the best it can. But since
> that font's not even a TrueType font, any "best guess" is not likely to be
> good.

I think the last point is the correct one. Win7 sure seems to come
with MS Sans Serif, but it's not TrueType so when it's enlarged
ridiculously it just chunks out.

Karl E. Peterson

unread,
Feb 2, 2010, 8:44:56 PM2/2/10
to
Karl E. Peterson formulated the question :

> But, now that I say that, hang on while I fire up a Win95 VM... Huh. Nope,
> doesn't "work" there. No error, but I get the same chunky font at 50pts as
> with just leaving it at Sans Serif. So, where's this kick in then, at NT4?

Works in Windows 2000...

MikeD

unread,
Feb 3, 2010, 9:33:05 AM2/3/10
to

"Karl E. Peterson" <ka...@exmvps.org> wrote in message
news:#7oZ52Gp...@TK2MSFTNGP06.phx.gbl...


Wouldn't that be the case in any version of Windows though?

--
Mike

Dee Earley

unread,
Feb 3, 2010, 10:34:42 AM2/3/10
to

MS Shell Dlg has always been the recommended font since win16 iirc.
It just may have been mapped to a bitmap font on prior to 2K :)

mayayana

unread,
Feb 3, 2010, 11:02:12 AM2/3/10
to

>
> MS Shell Dlg has always been the recommended font since win16 iirc.
> It just may have been mapped to a bitmap font on prior to 2K :)
>
I found it in MSDN under the title "MS Shell Dlg".
It seems to be a different page from the one you linked:
winbase.chm::/devdoc/live/pdwbase/nls_4qcn.htm

(Though I don't know how to actually navigate to
either link.)

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

MS Shell Dlg is a mapping mechanism that enables U.S. English Windows NT to
support non-code page 1252 locales. It is not a font but only a face name
for a nonexistent font. It can be specified in either the Windows NT Setup
file during the installation process or when customizing a local system by
double-clicking on the Control Panel's International icon. When you
double-click on the icon, select the appropriate Country and Language in the
International dialog box, and then reboot the system, the appropriate change
occurs in the following registry key:

HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\Current
Version\FontSubstitutes

----------

"Windows 95: You cannot switch Windows character sets, so the role of MS
Shell Dlg is more limited."

It appears to be limited to a static system font
alias function on Win9x. I have the following in
win.ini on Win98SE:

[FontSubstitutes]
Helv=MS Sans Serif
Tms Rmn=MS Serif
Times=Times New Roman
Helvetica=Arial
MS Shell Dlg=MS Sans Serif

It seems that it should work on Win95, but maybe
the win.ini setting is only something read by
Windows -- something that can be changed to change
the system font but not used programmatically to assign
the system font. Though I guess there's no reason
that the value couldn't be read directly at runtime.

Karl E. Peterson

unread,
Feb 3, 2010, 1:00:20 PM2/3/10
to
MikeD laid this down on his screen :
> "Karl E. Peterson" <ka...@exmvps.org> wrote...

>> MikeD pretended :
>>> Do I detect a bit of sarcasm there? I thought it was good advice. If you
>>> want to support later OSes, don't use ancient fonts. Yes, I know that MS
>>> Sans Serif is the default font that VB uses. Change it. Chances are,
>>> Windows 7 doesn't come with that specific font anymore, and so it's
>>> substituting a font and making a "best guess". It's probably doing the
>>> best it can. But since that font's not even a TrueType font, any "best
>>> guess" is not likely to be good.
>>
>> I think the last point is the correct one. Win7 sure seems to come with MS
>> Sans Serif, but it's not TrueType so when it's enlarged ridiculously it
>> just chunks out.
>
> Wouldn't that be the case in any version of Windows though?

Yes, sorry that wasn't worded more clearly. Afaik, MS Sans Serif has
always never been offered as a TrueType font.

Karl E. Peterson

unread,
Feb 3, 2010, 1:09:52 PM2/3/10
to
Dee Earley was thinking very hard :

> MS Shell Dlg has always been the recommended font since win16 iirc.

Recommended by whom? Where?

> It just may have been mapped to a bitmap font on prior to 2K :)

Seems like it, yeah. <g> It was obviously recognized in Win95, because
it didn't blow.

0 new messages