|
-
July 29th, 1999, 03:10 AM
#1
Just wanted to know...
Hello everybody!
This text is from Finland so forgive me my lousy english. (Time = 10:55 pm)
I there a way to get a string length in mm (millimeter). I have a product code which cannot be longer than 64 mm. I have to scale it somehow if it's longer. I'm in a lots of trouble. Visual Basic's help doesn't help me. Can you???
Yours,
Michael
-
July 29th, 1999, 04:14 AM
#2
Re: Just wanted to know...
the GetTextExtentPoint32 API returns the size of a text in logical units.
You can then use the LPtoDP function to convert it. Also check out the SetMapMode API.
-
July 30th, 1999, 12:26 AM
#3
Re: Just wanted to know...
Hi!
Go Lothar go... Yeah, it worked! Thanks man. You're a real day saver. Thanks again.
Michael
-
July 30th, 1999, 01:41 AM
#4
Re: Just wanted to know...
Cool.
Would you post your code here?
I'd like to see that TextToMMConversion routine. It might be useful for all of us.
-
July 30th, 1999, 02:11 AM
#5
Re: Just wanted to know...
Another way of doing it (I finally decided to do it like this):
Dim TempHelp As String
Dim CodeLenght As Long
printer.scalemode = 6 'mm, can be anything (0-7)
TempHelp = "I love my country (Finland)"
CodeLenght = Printer.ScaleWidth(TempHelp)
'At this point CodeLenght will be in mm's. It depends what fontsize and fontname you are using but with a little tricky tricky stuff you'll get the comparing session nicely ended.
Hope this helps, that's how I did it. It works in my prog. By the way: production cards sucks.
Michael
-
July 30th, 1999, 02:14 AM
#6
Re: Just wanted to know...
That's really cool.
What does that mean?
>production cards sucks
what are production cards?
-
July 30th, 1999, 02:22 AM
#7
Re: Just wanted to know...
Here in our company we do product cards which are A4 size paper pieces. Maybe there are better way to express it, but in our language it's called 'tuotekortti'. One product has one card and in the card there are mentioned all the features of product. For example in the clothing business the card includes it's unique (product) number, it's color, codes and something like that. And the part where I said that it sucks. It means that I have learned to hate the cards. If you have a e-mail address. I could send you the next card I finish. If it's ok?
Michael
-
July 30th, 1999, 02:26 AM
#8
Re: Just wanted to know...
'tuotekortti'? I am intimidated :-)
Thanks for the information.
I don't think a could use such a thing.
-
July 30th, 1999, 02:29 AM
#9
Re: Just wanted to know...
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
|