先汗一个!书里这么写的意思是fontbold有两个属性分别是true和false,写代码的时候可不能这么写,因为true的值是1而flase的值是0,所以你写成那样,编译器会认为你在进行1除以0的运算,我们知道除数是不能为0的,所以报出了运行时错误。
正确的写法如下(写在command的click里):
if lblShow.Fontbold=true then
lblShow.Fontbold=false
else
lblShow.Fontbold=true
end if
LblShow.FontItalic = True/False
什么意思??不能这样写的
应该是:
if LblShow.FontItalic=true then
LblShow.FontItalic=false
else
LblShow.FontItalic=true
end if