Click to See Complete Forum and Search --> : Ascii Character & Tabstrip control
CCDriver
May 11th, 2001, 01:28 AM
Does anyone have a tabstrip example to show how to build a tab control in a step-by-step example?
I'm stuffed if i can get these to work.
Also does anyone know why when i put in the ascii character 153 (trademark symbol) all i get is a thick vertical line? as a matter of fact none of the characters between 150 to 159 work.
I can get the copyright symbol (169) and the registered symbol (174) to work ok but not the trademark one.
I'm using them all like this Chr(169)
Can anyone help?
coolbiz
May 11th, 2001, 06:52 AM
Try looking at Microsoft Tabbed Dialog Control instead of Tab Strip. I could not get Tab Strip to work either before. Where are you trying to put the Chr(153)? It does not work if you put it on a command button but should work fine if you actually put it on a text control.
HTH,
-Cool Bizs
John G Duffy
May 11th, 2001, 12:34 PM
The interpretation of the chr$(xx) values depends on the font you are using and how the control you are placing the character on interprets it. Chr$(153) may not be a trademark symbol in the Font you are using.
John G
Isaacson
May 11th, 2001, 03:24 PM
private FontIndx as Integer
' Paste this into the code section, then...
' Make a TextBox named txtChars with MultiLine set to true and
' one Command Button named cmdStep. make the TextBox 3255 x 3975 twips,
' to be sure you can see all of it's contents
' Click cmdStep to go through all of the fonts on your machine to
' see wich one has the special characters you need.
' You may need to distribute the font that has your special characters
' along with your application.
private Sub cmdStep_Click()
Dim j as Integer
' wrap the count back to 1
If FontIndx > Screen.FontCount - 1 then
FontIndx = 0
End If
txtChars.Text = ""
txtChars.Font = Screen.Fonts(FontIndx)
txtChars.FontBold = false
txtChars.Text = Screen.Fonts(FontIndx) & " # " & FontIndx & " of " & Screen.FontCount - 1 & vbCrLf
' change this number range for various special characters
for j = 150 to 160
txtChars.Text = txtChars.Text & Chr(j) & " = " & j & vbCrLf
next j
' Or hard code known values
txtChars.Text = txtChars.Text & Chr(169) & " Copyright = 169" & vbCrLf
txtChars.Text = txtChars.Text & Chr(174) & " Registered = 174" & vbCrLf
FontIndx = FontIndx + 1
End Sub
private Sub Form_Load()
FontIndx = 0
End Sub
CCDriver
May 11th, 2001, 09:00 PM
I'll reply to my message instead of each message:
Thanks for the replys.
Thanks for that bit of code Isaacson, i'll look into it.
Do you three mean the font i'm currently using in VB6 or in Windows 98SE?
John G & CoolBizs: (how you going CoolBizs, thought i'd ask someone else for a change, your proberly sick of me asking questions)
The character is being placed in a label in the about box. E.G "[name] is an Registered " & Chr(174) & " Trademark" & Chr(153) & " of [whoever]"
Well.. i'm just doing it quickly so it's something like that.
CoolBizs:
Christ! no wonder i can't get the stupid Tabstrip to work if YOU'VE had trouble with it. The Tab control one you speak of is that the SST Tab control, i've used that and it looks ugly as sin, simple to use but ugly as hell.
I have some code for a tabstrip (it works) but i can't marry it to into another form where it is needed.
I'll do some more searching and see if i can find something else.
Thank you for your help guys.
John G Duffy
May 12th, 2001, 09:44 AM
Change your Labels Font to "News Gothic MT".
Chr$(153) = tm
Chr$(169) = (c)
chr$(174) = (r)
Label1.FontName = "News Gothic MT"
Label1.Caption = "Trademark" & Chr$(153) & " Registered" & Chr$(174) & "CopyWrite" & Chr$(169)
John G
codeguru.com
Copyright Internet.com Inc., All Rights Reserved.