本文介绍了PB程序中安全控制的具体实现方法
//我如何才能够很好的控制程序的安全性呢?比如说,我要在一个窗口当中控制一个button的操作权限在datawindow中,操作一个字段的可操属性,难道要对这些个单独编码吗?有没有比较好的方式?窗口当中的权限放置在变量当中,然后把窗口的权限取消就可以了!
//一个把窗口redraw到screen中间的函数:f_wincenter(windowname)environment lenvlong ll_height,ll_widthif getenvironment(lenv)= -1 then messagebox("error","get screen message error!")else ll_height=pixelstounits(lenv.screenheight,Ypixelstounits!) ll_width=pixelstounits(lenv.screenwidth,xpixelstounits!) awin.y=(ll_height - awin.height)/2 - 200 awin.x=(ll_width - awin.width)/2 return 0 //成功返回0end ifreturn 1
本文源自:翔宇亭——IT乐园(http://),转载请保留此信息!