您的位置:程序门 -> vb -> 基础类



vb 控件问题紧急请教 


[收藏此页] [打印本页]选择字色:背景色:字体:[][][]


vb 控件问题紧急请教
发表于:2007-12-18 09:04:21 楼主
commandbutton   和   checkbox,   图片显示在控件上。如果button   的enabled设置为false,   控件上面的图片都变为灰色,也不能click。我现在想在enabled   =   true的情况下,用程序达到同样的效果:
1。   当commandbutton.enabled=true时,让按钮上的图片显示为灰色,就像commandbutton.enabled=false时的效果一样。
2。   当commandbutton.enabled=true时,按钮的click事件将被激活,如何用程序实现即使enable=ture,   当按下按钮时让它没有相应,就像commandbutton.enabled=false时的效果一样呢?


万分感激
发表于:2007-12-18 09:16:331楼 得分:0
2.
private   sub   command1_click()
    if   not   check1   then   exit   sub
    '......
end   sub
发表于:2007-12-18 09:32:352楼 得分:0
我也是这么写的   但是当我按下按钮的时候,如何不让按钮按下去呢?
发表于:2007-12-18 09:44:553楼 得分:0
不要用commandbutton了,用个picturebox接受click事件吧。保证不会被按下去!呵呵


快速检索

最新资讯
热门点击