-
May 3rd, 2020, 12:00 PM
#1
Thread Starter
Fanatic Member
Command Button
I am running VB6 on WIN10 Home. Is it possible to enter Unicode into command button caption, either via code or directly thru the command button properties? I have tried , but the Unicode value does not get translated.
I can enter Unicode in Word 2003 and notepad. I cave not tried in Excel 2003 or Access 2003.
Thanks
-
May 3rd, 2020, 04:55 PM
#2
Re: Command Button
Via code, you can try: SetWindowText or sending it to that control's default windows procedure. But that may only work if the project is manifested for common controls and Windows is themed. Search for a quick example of using unicode captions in the form's titlebar. The logic should be the same.
Otherwise, you may want to consider a unicode-compatable replacement. Krool has them in the codebank. Others may exist also.
-
May 3rd, 2020, 05:47 PM
#3
Thread Starter
Fanatic Member
Re: Command Button
I found Arial Unicode MS font on my WIN7 computer. I copied it to my WIN10. Using control InkEdit, I can get the translation to work. It still needs more work!
-
May 4th, 2020, 12:16 AM
#4
Member
Re: Command Button
make blank button and put label on top
-
May 4th, 2020, 07:45 AM
#5
Thread Starter
Fanatic Member
Re: Command Button
The label box is not Unicode aware. Olga55, when you say on top. I presume you mean over, NOT higher up on the form. ZOrder does not seem to work here.
-
May 4th, 2020, 10:47 AM
#6
Re: Command Button
Yes, olga doesn't to quite have a grasp on VB yet.
As far as using APIs, I gave it a quick try using SetWindowText and DefWindowProc APIs -- didn't work when app is themed and manifested; but wasn't sure it would either. Though the latter API can work for form captions in that scenario.
Looking like you may want a unicode-compatible command button. Remember, appearance of VB controls are not naturally unicode compatible.
-
May 4th, 2020, 11:05 AM
#7
Thread Starter
Fanatic Member
Re: Command Button
I changed the command buttons to picture boxes. These do not need to be Unicode compatible. I put pictures on the boxes. I use the Pic_Click routine to set the Unicode with ChrW$(####). Another touting translates the code for display.
-
May 4th, 2020, 02:08 PM
#8
Member
Last edited by olga55; May 4th, 2020 at 04:14 PM.
-
May 5th, 2020, 11:03 AM
#9
Thread Starter
Fanatic Member
Re: Command Button
Thank you Olga55 for your suggestion in Post#8. Until I can fully understand your recommendation, I will continue with my with Post #7.
Ok, so now I an using picture boxes to get to the unicode character to display. Sometimes I need tto display two characters in one place. I have the Unicode characters for both characters. Any suggestions, how I can do this?
Thanks
-
May 5th, 2020, 11:06 AM
#10
Re: Command Button
Two characters in one place? Not visualizing that. Are you talking about overlapping them? Otherwise, use .CLS ?
The picturebox as a .CurrentX & .CurrentY property. That would be needed to position the picturebox for drawing at a specific location.
-
May 5th, 2020, 11:16 AM
#11
Thread Starter
Fanatic Member
Re: Command Button
I am trying (for fun and education) to write create on the screen a keyboard in Hebrew. It is easy to get the codes for the Hebrew characters. However, in Hebrew,the vowels are placed underneath the letter. All letters are considered consonants. So lets suppose that a Hebrew letter is "A". A vowel could be the "ah" sound. It is displayed as "_". (of course no quotes). But there are a lot of letters and a lot of vowels. A keyboard could not be large enough. I can use the Left Alt key and the key that has the vowel. Now I have to mate the two piece, through the Unicode in wither hex or dec to get together in one place.
-
May 8th, 2020, 12:17 PM
#12
Thread Starter
Fanatic Member
Re: Command Button
I have found how to put two characters in the same place. I just use code as
"strCharCode = ChrW$(1493) & ChrW$(1468)".
As long as the second character is a vowel, both characters are displayed in 1 position. If the two characters are not vowels, they display in two adjacent positions.
I can get the display to go right to left as it should, but I cannot get the first character to start at the right side of the InkEdit control.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|