展开全部
实际就是图片更换,用浅色灯图片作为熄灭指示灯,用鲜艳深色等图片做为点亮指示灯
select case power
case 0
set image1.picture=loadpicture("c:\abc\熄灭.jpg")
case 1
set image1.picture=loadpicture("c:\abc\亮度1.jpg")
case 2
set image1.picture=loadpicture("c:\abc\亮度2.jpg")
case3
......
case n
set image1.picture=loadpicture("c:\abc\点亮n.jpg")
end select
select case power
case 0
set image1.picture=loadpicture("c:\abc\熄灭.jpg")
case 1
set image1.picture=loadpicture("c:\abc\亮度1.jpg")
case 2
set image1.picture=loadpicture("c:\abc\亮度2.jpg")
case3
......
case n
set image1.picture=loadpicture("c:\abc\点亮n.jpg")
end select
追问
这个开关控件和小灯是怎么弄上去了啊
追答
开关控件是slide,小灯是image,从工具箱上拖放到你窗口上!
slide 需要先在部件中添加:microsfot windows common control 6.0
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询