当前位置:首页
开发技术指南» 文章正文
    引言:

    摘要: 要在dialog显示的时候,就显示数据库里的几副图片,好像用这个activex控件比较方便吧 怎么加载图像,并显示呢?看了半天,没搞明白 高手指点下吧,最好举个例子吧,thanks! ......
    摘要: 最近做一个客户端程序,在xp及2000的环境下运行很正常,但在98上运行一段时间后,程序界面变得花里胡哨的,看起来全乱了套,有时系统会弹出“系统资源严重不足“的警告,我猜想是某些gdi资源没有释放,但是为什么xp及2000的环境下运行很正常,但98就不行了呢。期待高手的解答 ......


TreeView的焦点获得问题..如果使其获取不了焦点...

大致意思如下:  
   
  一个窗体中有3个控件:  
  1.tvwList                       [TreeView           ]  
  2.cmdCancel                   [CommandButton]  
  3.txtName                       [Textbox             ]  
   
  需要如下效果,  
   
  当文本框txtName中输入的值非法时,单击tvwList中的节点无效,但是可以使用cmdCancel取消输入.  
  请问该如何实现以上效果?  
   
  但是如果是下面这样的话,虽然tvwList获取不到,但是cmdCancel也不能使用啊!  
  Code:  
   
  Private   Sub   txtName_Validate(Cancel   As   Boolean)  
          txtName=trim(txtName)  
          if   txtName=""   or   not   isnumeric(txtname)   then  
                  msgbox   "输入值不能为空或数字,请重新输入!"  
                  Cancel=true  
          endif  
  End   sub  
   
  哪位大侠帮解决一下?

NO.1   作者: fishmans

Private   Sub   txtName_Validate(Cancel   As   Boolean)  
          txtName=trim(txtName)  
          if   txtName=""   or   not   isnumeric(txtname)   then  
                  msgbox   "输入值不能为空或数字,请重新输入!"  
                  treeview1.enabled=false  
          else  
                  treeview1.enabled=true  
          endif  
  End   sub  
 

NO.2   作者: winehero

当然,如果你可能有别的控件需要cmdCancel.causesvalidation=true,那么可以在txtname获取焦点时  
  将cmdcancel设为false,失去焦点在将其设为True  
  Private   Sub   txtName_GotFocus()  
          tvwList.CausesValidation   =   True  
          cmdCancel.CausesValidation   =   False  
  End   Sub  
   
  Private   Sub   txtName_LostFocus()  
          tvwList.CausesValidation   =   True  
          cmdCancel.CausesValidation   =   True  
  End   Sub  
 


 ·struts验证框架问题    »显示摘要«
    摘要: struts登录页面采用框架验证时,报错如下: 不知何意,请指教 谢谢!! error - org.apache.struts.validator.fieldchecks.validaterequired(java.lang.object, org.apache.commons.validator.validatoraction, org.apache.commons.validator.......
» 本期热门文章:

©2000-2007 All Rights Reserved. 最佳浏览:1024X768 MSIE