Quantcast
Channel: VBForums - Visual Basic 6 and Earlier
Viewing all articles
Browse latest Browse all 21205

Changing Fontsize in Win7 works, but when Prgm runs on Vista, no results

$
0
0
I realize this is probably not the best way to change fontsize, but it is what I am currently using...it works on my WIn7, but when I run the same program on Vista, no changes occur...unfortunately, I cannot test on the Vista (a friend's home computer that does not have VB)
List1 font is MS San Sarif

1-is there a better way to change fontsize?
2-why does this not work in Vista (clicking on the commandbutton, 'nothing happens', so must be none of the cases are met...but can't figure out why.)

Code:

Private Sub Command13_Click(Index As Integer)
If Index = 0 Then 'increase font
    Select Case List1.fontsize
    Case 8.25
        List1.fontsize = 10
        List2.fontsize = 10
        Text1.fontsize = 10
    Case 9.75
        List1.fontsize = 12
        List2.fontsize = 12
        Text1.fontsize = 12
    Case 12
        List1.fontsize = 14
        List2.fontsize = 14
        Text1.fontsize = 14
    Case 13.5
        List1.fontsize = 18
        List2.fontsize = 18
        Text1.fontsize = 18
    Case 18
        MsgBox ("This is the largest allowed font size.")
        Exit Sub
    End Select
 
Else  'decrease font
    Select Case List1.fontsize
    Case 8.25
        MsgBox ("This is the smallest allowed font size.")
        Exit Sub
    Case 9.75
        List1.fontsize = 8.25
        List2.fontsize = 8.25
        Text1.fontsize = 8.25
    Case 12
        List1.fontsize = 10
        List2.fontsize = 10
        Text1.fontsize = 10
    Case 13.5
        List1.fontsize = 12
        List2.fontsize = 12
        Text1.fontsize = 12
    Case 18
        List1.fontsize = 14
        List2.fontsize = 14
        Text1.fontsize = 14
    End Select
End If
End Sub


Viewing all articles
Browse latest Browse all 21205


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>