您的位置:程序门 -> vb -> 非技术类



请问vb是否有在整个工程的代码中查找有哪些地方使用过某个控件的功能?


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


请问vb是否有在整个工程的代码中查找有哪些地方使用过某个控件的功能?[已结贴,结贴人:chennan0656]
发表于:2007-03-04 23:21:12 楼主
请问vb是否有在整个工程的代码中查找有哪些地方使用过某个控件的功能?
比如我知道这个工程中使用过时钟控件,但忘了在哪里用过,也不知道给它取的什么名字,怎么样查找到它呢?
发表于:2007-03-05 08:31:231楼 得分:1
发表于:2007-03-05 14:41:182楼 得分:0
自己顶一下。
发表于:2007-03-05 15:52:343楼 得分:30
如果保存为ascii文件,用记事本打开所有.frm文件,搜timer.
例如该控件在frm文件里存为如下形式:
      begin   vb.timer   tmrxx  
            interval                 =       1000
            left                         =       3720
            top                           =       3000
      end
发表于:2007-03-05 15:54:004楼 得分:1
友情up
发表于:2007-03-05 16:29:585楼 得分:0
谢谢fclvgyfe()   。

在一个小工程中当然没问题,但是一个窗口n多的大工程里这样一个窗体一个窗体的打开找恐怕不太可行哦。

不知道有没有在整个工程中搜索的办法?

谢谢大家了!
发表于:2007-03-07 14:07:316楼 得分:3
timer控件只有timer事件,你可在代码窗口,用编辑菜单下的查找功能,选当前工程查找timer内容。
发表于:2007-03-12 13:50:367楼 得分:0
timer控件只是我打的比方,我想问一个针对所有控件的方法。
发表于:2007-03-12 14:01:248楼 得分:11
建议你在编写代码随时做好注释,那是程序员的基本要求。不然时间长了,是很难回忆的。
此外对控件名使用visual   basic   编码约定:
应该用一致的前缀来命名对象,使人们容易识别对象的类型。下面列出了   visual   basic   支持的一些推荐使用的对象约定。

推荐使用的控件前缀
控件类型   前缀   例子  
3d   panel     pnl   pnlgroup  
ado   data   ado   adobiblio  
animated   button   ani   animailbox  
check   box   chk   chkreadonly  
combo   box,   drop-down   list   box   cbo   cboenglish  
command   button   cmd   cmdexit  
common   dialog     dlg   dlgfileopen  
communications     com   comfax  
control   (当特定类型未知时,在过程中所使用的)   ctr   ctrcurrent  
data   dat   datbiblio  
data-bound   combo   box   dbcbo   dbcbolanguage  
data-bound   grid   dbgrd   dbgrdqueryresult  
data-bound   list   box   dblst   dblstjobtype  
data   combo   dbc   dbcauthor  
data   grid   dgd   dgdtitles  
data   list   dbl   dblpublisher  
data   repeater   drp   drplocation  
date   picker   dtp   dtppublished  
directory   list   box   dir   dirsource  
drive   list   box   drv   drvtarget  
file   list   box   fil   filsource  
flat   scroll   bar   fsb   fsbmove  
form   frm   frmentry  
frame   fra   fralanguage  
gauge   gau   gaustatus  
graph   gra   grarevenue  
grid   grd   grdprices  
hierarchical   flexgrid   flex   flexorders  
horizontal   scroll   bar   hsb   hsbvolume  
image   img   imgicon  
image   combo   imgcbo   imgcboproduct  
imagelist   ils   ilsallicons  
label   lbl   lblhelpmessage  
lightweight   check   box   lwchk   lwchkarchive  
lightweight   combo   box   lwcbo   lwcbogerman  
lightweight   command   button   lwcmd   lwcmdremove  
lightweight   frame   lwfra   lwfrasaveoptions  
lightweight   horizontal   scroll   bar   lwhsb   lwhsbvolume  
lightweight   list   box   lwlst   lwlstcostcenters  
lightweight   option   button   lwopt   lwoptincomelevel  
lightweight   text   box   lwtxt   lwoptstreet  
lightweight   vertical   scroll   bar   lwvsb   lwvsbyear  
line   lin   linvertical  
list   box   lst   lstpolicycodes  
listview   lvw   lvwheadings  
mapi   message   mpm   mpmsentmessage  
mapi   session   mps   mpssession  
mci   mci   mcivideo  
menu   mnu   mnufileopen  
month   view   mvw   mvwperiod  
ms   chart   ch   chsalesbyregion  
ms   flex   grid   msg   msgclients  
ms   tab     mst   mstfirst  
ole   container   ole   oleworksheet  
option   button   opt   optgender  
picture   box   pic   picvga  
picture   clip   clp   clptoolbar  
progressbar   prg   prgloadfile  
remote   data   rd   rdtitles  
richtextbox   rtf   rtfreport  
shape   shp   shpcircle  
slider   sld   sldscale  
spin   spn   spnpages  
statusbar   sta   stadatetime  
sysinfo   sys   sysmonitor  
tabstrip   tab   taboptions  
text   box   txt   txtlastname  
timer   tmr   tmralarm  
toolbar   tlb   tlbactions  
treeview   tre   treorganization  
updown   upd   upddirection  
vertical   scroll   bar   vsb   vsbrate  
发表于:2007-03-12 16:03:519楼 得分:3
直接用   ultra-edit   之类搜索工程目录下的文件是否包含控件的   progid(比如   vb.timer),当然前提是代码要放在某个汇总目录下
发表于:2007-03-12 17:26:4810楼 得分:1
没明白你要干什么?要是单单找到所有和某控件有关的代码就直接全工程搜索他的控件名不就完了?很复杂么?


快速检索

最新资讯
热门点击