Board index » Visual Studio » Checkmark.

Checkmark.

Visual Studio147
Hi all,



I posted this question already in ...visual.misc,

but it seems that this group is more widely used.



I would like to place a checkmark in a MSHFlexGrid,

but it can't be represented with a Chr().

I now use a bold "V" but a real checkmark would

centainly look better.



Has anyone an idea how to create it?

Bert.


-
 

Re:Checkmark.

"Bert van den Dongen" <bertdon@tiscali.nl>wrote in message

Quote
Hi all,



I posted this question already in ...visual.misc,

but it seems that this group is more widely used.



I would like to place a checkmark in a MSHFlexGrid,

but it can't be represented with a Chr().

I now use a bold "V" but a real checkmark would

centainly look better.



Has anyone an idea how to create it?



I don't use MSHFlexGrid but if it supports putting an image in a cell (in

MSFlexGrid it's the CellPicture) then you can create two images, one with a

checkmark and one without, and display as appropriate.



-

Re:Checkmark.

Yes, good idea! Thank you, Bob.

Bert.





"Bob Butler" <noway@nospam.ever>schreef in bericht

Quote
"Bert van den Dongen" <bertdon@tiscali.nl>wrote in message

news:46f6646c$0$24392$5fc3050@news.tiscali.nl...

>Hi all,

>

>I posted this question already in ...visual.misc,

>but it seems that this group is more widely used.

>

>I would like to place a checkmark in a MSHFlexGrid,

>but it can't be represented with a Chr().

>I now use a bold "V" but a real checkmark would

>centainly look better.

>

>Has anyone an idea how to create it?



I don't use MSHFlexGrid but if it supports putting an image in a cell (in

MSFlexGrid it's the CellPicture) then you can create two images, one with

a checkmark and one without, and display as appropriate.





-

Re:Checkmark.

"Bert van den Dongen" <bertdon@tiscali.nl>wrote in message

Quote
Yes, good idea! Thank you, Bob.



Another option might be Chr$(&HFC) with the font set to WingDings





-

Re:Checkmark.

Quote
>Yes, good idea! Thank you, Bob.



Another option might be Chr$(&HFC) with the font set to WingDings



Not realizing this question was reposted here, I just provided this answer

over in the comp.lang.basic.visual newsgroup...



Make the font for the cell(s) Marlett and then use either "a" or "b" (these

are lower case letters) either of which will display as a check mark (I'm

not sure what the difference between these two characters are supposed to

be; they look the same to me).



Rick



-

Re:Checkmark.

As near as I can tell, the only difference is that one's an "a" and one's a "b". ;-) Even at large sizes, there's no visible

character difference, no spacing difference, no nothing!





Rob



"Rick Rothstein (MVP - VB)" <rickNOSPAMnews@NOSPAMcomcast.net>wrote in message news:eUw4uNg$HHA.4612@TK2MSFTNGP03.phx.gbl...

Quote
>>Yes, good idea! Thank you, Bob.

>

>Another option might be Chr$(&HFC) with the font set to WingDings



Not realizing this question was reposted here, I just provided this answer over in the comp.lang.basic.visual newsgroup...



Make the font for the cell(s) Marlett and then use either "a" or "b" (these are lower case letters) either of which will display

as a check mark (I'm not sure what the difference between these two characters are supposed to be; they look the same to me).



Rick







-

Re:Checkmark.

Good... thanks for the confirmation. I looked also and couldn't find

anything noticeable and figured I had to be missing something.



Rick



"Robert Morley" <rmorley@magma.ca.N0.Freak1n.sparn>wrote in message

Quote
As near as I can tell, the only difference is that one's an "a" and one's

a "b". ;-) Even at large sizes, there's no visible character difference,

no spacing difference, no nothing!





Rob



"Rick Rothstein (MVP - VB)" <rickNOSPAMnews@NOSPAMcomcast.net>wrote in

message news:eUw4uNg$HHA.4612@TK2MSFTNGP03.phx.gbl...

>>>Yes, good idea! Thank you, Bob.

>>

>>Another option might be Chr$(&HFC) with the font set to WingDings

>

>Not realizing this question was reposted here, I just provided this

>answer over in the comp.lang.basic.visual newsgroup...

>

>Make the font for the cell(s) Marlett and then use either "a" or "b"

>(these are lower case letters) either of which will display as a check

>mark (I'm not sure what the difference between these two characters are

>supposed to be; they look the same to me).

>

>Rick

>







-

Re:Checkmark.

On Sun, 23 Sep 2007 13:58:34 -0400, "Rick Rothstein \(MVP - VB\)"

<rickNOSPAMnews@NOSPAMcomcast.net>wrote:



Quote
Good... thanks for the confirmation. I looked also and couldn't find

anything noticeable and figured I had to be missing something.



Rick



On my Win95 box the "b" version sits higher in the character matrix.

If you click the "a" version in Character Map to magnify and then mouse back and

forth between "a" and "b" you might notice "b" rises slightly. I copied and

pasted both into Word and set the font size to 36, and the difference was

clearly noticeable.



YMMV



RW

-

Re:Checkmark.

Quote
>Good... thanks for the confirmation. I looked also and couldn't find

>anything noticeable and figured I had to be missing something.

>

>Rick



On my Win95 box the "b" version sits higher in the character matrix.

If you click the "a" version in Character Map to magnify and then mouse

back and

forth between "a" and "b" you might notice "b" rises slightly. I copied

and

pasted both into Word and set the font size to 36, and the difference was

clearly noticeable.



Ah, yes, doing that does show a noticeable difference. However, at normal

font sizes, it is much harder to see... I wonder which two use situations

they were developed to handle.



Rick



-

Re:Checkmark.

"Rick Rothstein (MVP - VB)" <rickNOSPAMnews@NOSPAMcomcast.net>wrote in

message news:eUw4uNg$HHA.4612@TK2MSFTNGP03.phx.gbl...



Quote
Make the font for the cell(s) Marlett and then use either "a"

or "b" (these are lower case letters) either of which will

display as a check mark (I'm not sure what the difference

between these two characters are supposed to be; they

look the same to me).



The shape and size of the glyph is the same in both cases and they are both

at the same horizontal position within the cell, but the "b" sits a little

higher up in the character cell than does the "a". Here's some code that

draws both characters at exactly the same position on the Form, the "a" in

blue and the "b" in red. I've drawn them both in outline so that you can

more easily see how the glyphs overlay each other and I've drawn blue and

red rectangles to show the characters cell (you'll only see the red

rectangle because it is the same size as the blue).



Mike



Option Explicit

Private Declare Function BeginPath Lib "gdi32" _

(ByVal hdc As Long) As Long

Private Declare Function EndPath Lib "gdi32" _

(ByVal hdc As Long) As Long

Private Declare Function StrokePath Lib "gdi32" _

(ByVal hdc As Long) As Long

Private Declare Function TextOut Lib "gdi32" Alias _

"TextOutA" (ByVal hdc As Long, ByVal x As Long, _

ByVal y As Long, ByVal lpString As String, _

ByVal nCount As Long) As Long



Private Sub Form_Load()

Dim s1 As String

AutoRedraw = True

Font.Name = "Marlett"

Font.Size = 250

ForeColor = vbBlue

s1 = "a"

BeginPath Me.hdc

TextOut Me.hdc, 0, 0, s1, Len(s1)

EndPath Me.hdc

StrokePath Me.hdc

Line (0, 0)-(TextWidth(s1), TextHeight(s1)), , B

Me.ForeColor = vbRed

s1 = "b"

BeginPath Me.hdc

TextOut Me.hdc, 0, 0, s1, Len(s1)

EndPath Me.hdc

StrokePath Me.hdc

Line (0, 0)-(TextWidth(s1), TextHeight(s1)), , B

Me.Refresh

End Sub











-

Re:Checkmark.

D'oh! When I tested in Word (at 72 points), I did:



aa

bb



to test for spacing differences. Never occurred to me to look for baseline differences. UGH!







Rob





-

Re:Checkmark.

Well, thank you all for your time.

I used Rick's suggestion with the Marlett Font.

Also tried both a and b, saw no difference and picked a.

Never realised that it would bring such a long thread.

Thanks for your program, Mike.

It clearly shows the difference.

Gonna try the WingDingThing too.



Thanks to all.

Bert.





"Mike Williams" <mike@WhiskyAndCoke.com>schreef in bericht

Quote
"Rick Rothstein (MVP - VB)" <rickNOSPAMnews@NOSPAMcomcast.net>wrote in

message news:eUw4uNg$HHA.4612@TK2MSFTNGP03.phx.gbl...



>Make the font for the cell(s) Marlett and then use either "a"

>or "b" (these are lower case letters) either of which will

>display as a check mark (I'm not sure what the difference

>between these two characters are supposed to be; they

>look the same to me).



The shape and size of the glyph is the same in both cases and they are

both at the same horizontal position within the cell, but the "b" sits a

little higher up in the character cell than does the "a". Here's some code

that draws both characters at exactly the same position on the Form, the

"a" in blue and the "b" in red. I've drawn them both in outline so that

you can more easily see how the glyphs overlay each other and I've drawn

blue and red rectangles to show the characters cell (you'll only see the

red rectangle because it is the same size as the blue).



Mike



Option Explicit

Private Declare Function BeginPath Lib "gdi32" _

(ByVal hdc As Long) As Long

Private Declare Function EndPath Lib "gdi32" _

(ByVal hdc As Long) As Long

Private Declare Function StrokePath Lib "gdi32" _

(ByVal hdc As Long) As Long

Private Declare Function TextOut Lib "gdi32" Alias _

"TextOutA" (ByVal hdc As Long, ByVal x As Long, _

ByVal y As Long, ByVal lpString As String, _

ByVal nCount As Long) As Long



Private Sub Form_Load()

Dim s1 As String

AutoRedraw = True

Font.Name = "Marlett"

Font.Size = 250

ForeColor = vbBlue

s1 = "a"

BeginPath Me.hdc

TextOut Me.hdc, 0, 0, s1, Len(s1)

EndPath Me.hdc

StrokePath Me.hdc

Line (0, 0)-(TextWidth(s1), TextHeight(s1)), , B

Me.ForeColor = vbRed

s1 = "b"

BeginPath Me.hdc

TextOut Me.hdc, 0, 0, s1, Len(s1)

EndPath Me.hdc

StrokePath Me.hdc

Line (0, 0)-(TextWidth(s1), TextHeight(s1)), , B

Me.Refresh

End Sub













-