Smart questions
Smart answers
Smart people
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Member Login

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips now!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

Join Tek-Tips
*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

LINK TO THIS FORUM!

Add Stickiness To Your Site By Linking To This Professionally Managed Technical Forum.
Just copy and paste the
code below into your site.

Partner With Us!

"Best Of Breed" Forums Add Stickiness To Your Site
Partner Button
(Download This Button Today!)

Feedback

...I enjoy spending time on it for personal growth (I learn from the questions I don't answer, and I reinforce/stay sharp on the topics I do answer), and to give back to humanity at large...

Geography

Where in the world do Tek-Tips members come from?

Cannot vertically align strings containing both Japanese and English text

biggerb46 (Programmer)
20 Jul 12 19:12
I am using Visual Basic to align the text of strings which often consist of different fonts. The first part of each string consists of numerals. The second part of the string consists of Japanese characters and the third part consists of English characters.

These changes in fonts cause vertical alignment to be difficult. I need a method to ensure proper verticle alignment of the English portion of each string. In other words, I want to change this:

3.1.3.1 CPC コネクタ UNTESTED UNTESTED

3.1.4.2 バッテリチャージ (80 to 100 %) UNTESTED UNTESTED

3.1.6.4 VGA 出力試験 UNTESTED UNTESTED

3.1.8.4 ビデオオーバーレイ試験(図4) UNTESTED UNTESTED

3.1.9.3 MP3 UNTESTED UNTESTED

3.1.10.1 CPUバッテリ交換 UNTESTED UNTESTED


Into this:

3.1.3.1 CPC コネクタ UNTESTED UNTESTED

3.1.4.2 バッテリチャージ (80 to 100 %) UNTESTED UNTESTED

3.1.6.4 VGA 出力試験 UNTESTED UNTESTED

3.1.8.4 ビデオオーバーレイ試験(図4) UNTESTED UNTESTED

3.1.9.3 MP3 UNTESTED UNTESTED

3.1.10.1 CPUバッテリ交換 UNTESTED UNTESTED


I am using Visual Basic 6.5. I am trying to print the strings into a Word document.


I tried using the TextWidth() method in the Form that prints out these strings however this method is not available: I don't see it inside the list of methods of the Form's class.


I want to implement a method that will count the number of twips between each part of string before it is printed out. I could then make adjustments to the spacing between Japanese and English characters.


Is there a way to do this that does not involve the 'TextWidth' method?


Is there a declaration or code that I can add to either the Main Form or a Class Module that will allow me to use 'TextWidth' method or some other measurement function?

If there is a better way to do this besides using twips please tell me.

strongm (MIS)
22 Jul 12 12:36
>Visual Basic 6.5.

Which is VBA, not VB. You might want to ask in forum707: VBA Visual Basic for Applications (Microsoft)
strongm (MIS)
23 Jul 12 4:21
(plus with the example as shown I cannot see what your actual problem is)

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close