本文介紹了PB程序中安全控制的具體實現方法
//我如何才能夠很好的控制程序的安全性呢?
比如說,我要在一個窗口當中控制一個button的操作權限
在datawindow中,操作一個字段的可操屬性,難道要對這些個單獨編碼嗎?
有沒有比較好的方式?
窗口當中的權限放置在變量當中,然后把窗口的權限取消就可以了!
//一個把窗口redraw到screen中間的函數:
f_wincenter(windowname)
environment lenv
long ll_height,ll_width
if 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 //成功返回0
end if
return 1
新聞熱點
疑難解答