Enhanced Msgbox alternative with unicode character set (1 Viewer)

deletedT

Guest
Local time
Today, 00:50
Joined
Feb 2, 2019
Messages
1,220
Good to have another alternative. I see much of the code is by Richard Bompuis (Cypris) & is used in his very similar Enhanced Message Box replacement app

I've seen this site before. But it never works.
Though the author has a long blog on unicode and Chinese(Japanese) character sets, this msgbox doesn't work in unicode languages.

this is from the article:



And this is actually what happens:



EDIT by Isladogs
I've moved this post from Sample Databases at Tera's request.
It is related to this thread started by arnelgp https://www.access-programmers.co.uk/forums/showthread.php?t=306850
 

Attachments

  • 2019-09-17_17-19-39.jpg
    2019-09-17_17-19-39.jpg
    23.7 KB · Views: 118
  • 2019-09-17_17-18-09.jpg
    2019-09-17_17-18-09.jpg
    45.6 KB · Views: 122
Last edited by a moderator:

isladogs

CID VIP
Local time
Today, 00:50
Joined
Jan 14, 2017
Messages
14,016
I've found the enhanced message box example works well though I've not needed to use it with anything other than standard character sets.

Are you suggesting it doesn't work at all for you?
 

isladogs

CID VIP
Local time
Today, 00:50
Joined
Jan 14, 2017
Messages
14,016
Isn't the example you showed just intended to illustrate the point?
This is also from the example app:

 

Attachments

  • Capture.PNG
    Capture.PNG
    38.6 KB · Views: 102

deletedT

Guest
Local time
Today, 00:50
Joined
Feb 2, 2019
Messages
1,220
I'll try to explain the problem in more details. Though I'm not sure if I'll be able to.

One of the abilities of this enhanced msgbox(EMB) is that we can use backslash and n to insert a new line. A new method instead of vbCrLf.
Well. It's a nightmare if your Windows local is not set to English. For example for us who use Japanese/Korean/Chinese and a lot more.

Because these languages use different signs for backslash.
This is backslash when Windows Local is set to English:
\

This is backslash when Windows Local is set to Japanese:


This is backslash when Windows Local is set to Korean:


Apparently, Because I live in Japan, Windows Local is set to Japanese. With this situation I want to send a message with two lines.Something like:
This is Line 1
This is Line 2


According to the documentation:


Then my code would be:
Dialog.Box "This is line 1 \n This is Line 2"

But as you see when I type backslash it is a Yen sign:


And when I run the code, apparently I receive this:


And as you see, the program doesn't catch yen sign as a backslash. I have only one line with a nonsense ¥n in the middle.


Click this link https://en.wikipedia.org/wiki/Backslash
and scroll down to Confusion in usage section. You'll see even Swedish or Danish or other countries have different backslashes.
I've never been to those countries and I'm not sure if they have the same problem as me, but personally I think replacing vbCrLf to a sign which may cause problem is not a wise decision.
Imagine you write a program and sell it to someone in another country. You can be sure what they see is different with what you see. And as a programmer point of view you know the damage.

I know some programming languages such as PHP use \n for new line, but those languages' interpreter engine is designed to recognize different shapes of a backslash.


I hope I've been clear enough.
Important : Be sure to read the Confusion in Use section in above link please.



Tera
 

Attachments

  • yen.png
    yen.png
    1 KB · Views: 83
  • won.png
    won.png
    1.1 KB · Views: 81
  • explain.jpg
    explain.jpg
    26.2 KB · Views: 83
  • code.jpg
    code.jpg
    9.7 KB · Views: 84
  • msgbox.jpg
    msgbox.jpg
    11 KB · Views: 86
Last edited:

deletedT

Guest
Local time
Today, 00:50
Joined
Feb 2, 2019
Messages
1,220
Are you suggesting it doesn't work at all for you?

No. Up to now the only section that doesn't work is the use of backslash and n for new line.
I'm testing different section and if find anything else I'll post it here.
 

isladogs

CID VIP
Local time
Today, 00:50
Joined
Jan 14, 2017
Messages
14,016
No. Up to now the only section that doesn't work is the use of backslash and n for new line.
I'm testing different section and if find anything else I'll post it here.

Many thanks for providing such a detailed account of the issue which you've explained very clearly.

I have only looked briefly at the code involved and make to pretence to have understood it properly.
However it appears you can disable the feature and restore the use of vbcrlf.
Have a look in the dialog lass module at the Get and Let DefaultNoStrEsc property which can be set true/false with default false. Does it solve the issue if you set it true … or, possibly easier, set the default as true.

Whether or not that works, I would suggest you contact the author to ensure he is aware of the issue
 

deletedT

Guest
Local time
Today, 00:50
Joined
Feb 2, 2019
Messages
1,220
Many thanks for providing such a detailed account of the issue which you've explained very clearly.

I have only looked briefly at the code involved and make to pretence to have understood it properly.
However it appears you can disable the feature and restore the use of vbcrlf.
Have a look in the dialog lass module at the Get and Let DefaultNoStrEsc property which can be set true/false with default false. Does it solve the issue if you set it true … or, possibly easier, set the default as true.

Whether or not that works, I would suggest you contact the author to ensure he is aware of the issue

That was not the only problem. Other languages than English have more difficulties with this enhanced message box.
Here's two more.

There's a Redimension procedure to resize the message box. Though the description says this EMB can handle long messages but when I launch the database and click the button marked in right, you see the last line is almost hidden and there's no scroll bar either:



And in some cases the message is garbled:



I think Microsoft doesn't add these enhances because they know there isn't a safe way to establish these utilities into Office. Different Locale, different languages, different windows character sets and a lot more problems makes office less stable. And it's the last thing they are after.

I'll check to see if I can find anything else and perhaps contact the author to let him know these problems.
 

Attachments

  • 2019-09-18_9-39-14.jpg
    2019-09-18_9-39-14.jpg
    51.3 KB · Views: 70
  • 2019-09-18_9-42-43.jpg
    2019-09-18_9-42-43.jpg
    50.7 KB · Views: 60

isladogs

CID VIP
Local time
Today, 00:50
Joined
Jan 14, 2017
Messages
14,016
Thanks for the update. The author definitely needs to know about these issues and hopefully fix them

That was not the only problem. Other languages than English have more difficulties with this enhanced message box.
Here's two more.

There's a Redimension procedure to resize the message box. Though the description says this EMB can handle long messages but when I launch the database and click the button marked in right, you see the last line is almost hidden and there's no scroll bar either:



And in some cases the message is garbled:



I think Microsoft doesn't add these enhances because they know there isn't a safe way to establish these utilities into Office. Different Locale, different languages, different windows character sets and a lot more problems makes office less stable. And it's the last thing they are after.

I'll check to see if I can find anything else and perhaps contact the author to let him know these problems.
 

Users who are viewing this thread

Top Bottom