PB中类似的闪屏的东西。

happy00002002 2002-03-14 10:45:43
我们知道,在大一点的程序运行时,如果后端加载数据的时间比较长,那么程序的界面往往会给出一个类似“数据加载中,请等待。。。。。”这样的东西(我叫它闪屏,也许不恰当 :)),现在我就需要这个东西,请大家帮我想想办法。(能提供美工图最好了。。。。)
谢谢!~
...全文
121 14 打赏 收藏 转发到动态 举报
写回复
用AI写文章
14 条回复
切换为时间正序
请发表友善的回复…
发表回复
zjchenhui 2002-03-19
  • 打赏
  • 举报
回复
up.
zjchenhui 2002-03-15
  • 打赏
  • 举报
回复
to killerdanny(danny@转职中...月夜惊心) :
可以给个链接吗?
谢谢!
jjweid 2002-03-14
  • 打赏
  • 举报
回复
怎么在上面
放个 flash,gif
ole吗?
abcn 2002-03-14
  • 打赏
  • 举报
回复
最简单的方法,就是做一个窗口,在上面放上一幅GIF动画,当执行完时关闭窗口!
happy00002002 2002-03-14
  • 打赏
  • 举报
回复
gf_midopenwin(this)
是你自己的定义的一个全局函数吧?
如果谁有例子或者这方面的图或控件最好了。。
fallstone 2002-03-14
  • 打赏
  • 举报
回复
同意gungod2000(打你屁屁^_^) 。简单。
zhanwei 2002-03-14
  • 打赏
  • 举报
回复
做法类似于FLASH窗口,
窗口类型:POPUP窗口,不要标题,
OPEN事件:加入
gf_midopenwin(this)
this.setposition(TopMost!)
至于你窗口上放什么控件就看你了,
如数据窗口大数据量检索,速度慢:
retrievestart:open(w_popup)
retrieveend:if isvalid(w_popup) then close(w_popup)
即可!

gungod2000 2002-03-14
  • 打赏
  • 举报
回复
自己做一个窗口就行了,加载数据时打开窗口,完毕后关掉就ok了.
killerdanny 2002-03-14
  • 打赏
  • 举报
回复
讨情的网站上,有个带动画的MESSAGEBOX窗口,你可以去看看!
happy00002002 2002-03-14
  • 打赏
  • 举报
回复
很感谢这位zhanwei(詹维)朋友!!
我的可用分太少了,不好意思!
zhanwei 2002-03-14
  • 打赏
  • 举报
回复
eg.
open(W_flash)
W_flash.wf_setmsg( "数据转入!系统正在检查转入的数据文件!")
W_flash.wf_setmaxnumber(ll_rowcount)
W_flash.wf_setcurnumber(0)
...
W_flash.wf_setcurnumber(ll_number)
yield()
...
zhanwei 2002-03-14
  • 打赏
  • 举报
回复
w_flash source code:
desc:
this window has 3 win function:
public function integer wf_setmaxnumber (integer as_maxnum)
public function integer wf_setcurnumber (integer as_curnum)
public function integer wf_setmsg (string as_msg)

wf_setmaxnumber ,wf_setcurnumber :control the progressbar,

wf_setmsg :control the message
eg.
open(W_msg_probar)
w_msg_probar.wf_setmsg( "数据转入!系统正在检查转入的数据文件!")
w_msg_probar.wf_setmaxnumber(ll_rowcount)
w_msg_probar.wf_setcurnumber(0)
...
w_msg_probar.wf_setcurnumber(ll_number)
yield()
...

$PBExportHeader$w_flash.srw
forward
global type w_flash from Window
end type
type st_msg from statictext within w_flash
end type
type st_1 from statictext within w_flash
end type
type dw_1 from datawindow within w_flash
end type
end forward

global type w_flash from Window
int X=823
int Y=360
int Width=1408
int Height=624
boolean TitleBar=true
string Title="信息处理进度提示信息"
long BackColor=79741120
WindowType WindowType=popup!
st_msg st_msg
st_1 st_1
dw_1 dw_1
end type
global w_flash w_flash

forward prototypes
public function integer wf_setmaxnumber (integer as_maxnum)
public function integer wf_setcurnumber (integer as_curnum)
public function integer wf_setmsg (string as_msg)
end prototypes

public function integer wf_setmaxnumber (integer as_maxnum);long ll_row
integer li_ret = -1

if dw_1.rowcount() > 0 then
ll_row = dw_1.getrow()
li_ret = dw_1.setitem(ll_row,'maxnumber',as_maxnum)
end if

return li_ret

end function

public function integer wf_setcurnumber (integer as_curnum);long ll_row
integer li_ret = -1

if dw_1.rowcount() > 0 then
ll_row = dw_1.getrow()
li_ret = dw_1.setitem(ll_row,'curnumber',as_curnum)
end if

return li_ret

end function

public function integer wf_setmsg (string as_msg);st_msg.text = as_msg
return 0


end function

on w_flash.create
this.st_msg=create st_msg
this.st_1=create st_1
this.dw_1=create dw_1
this.Control[]={this.st_msg,&
this.st_1,&
this.dw_1}
end on

on w_flash.destroy
destroy(this.st_msg)
destroy(this.st_1)
destroy(this.dw_1)
end on

event open;long ll_row
dw_1.settransobject(sqlca)
ll_row = dw_1.insertrow(0)
dw_1.setitem(ll_row,'maxnumber',100)
dw_1.setitem(ll_row,'curnumber',0)
st_msg.text = ''
gf_midopenwin(this)
this.setposition(TopMost!)

end event

type st_msg from statictext within w_flash
int X=50
int Y=172
int Width=1239
int Height=168
boolean Enabled=false
string Text="正在进行数据处理,清稍候..."
boolean FocusRectangle=false
long TextColor=33554432
long BackColor=79741120
int TextSize=-9
int Weight=700
string FaceName="宋体"
FontCharSet FontCharSet=GB2312CharSet!
FontPitch FontPitch=Variable!
end type

type st_1 from statictext within w_flash
int X=46
int Y=56
int Width=869
int Height=76
boolean Enabled=false
string Text="正在进行数据处理,清稍候..."
boolean FocusRectangle=false
long TextColor=33554432
long BackColor=67108864
int TextSize=-9
int Weight=700
string FaceName="宋体"
FontCharSet FontCharSet=GB2312CharSet!
FontPitch FontPitch=Variable!
end type

type dw_1 from datawindow within w_flash
int X=50
int Y=372
int Width=1262
int Height=96
int TabOrder=10
string DataObject="d_progressbar"
BorderStyle BorderStyle=StyleLowered!
end type

zhanwei 2002-03-14
  • 打赏
  • 举报
回复
看我的代码:
gf_midopenwin:

$PBExportHeader$gf_midopenwin.srf
$PBExportComments$在工作区间居中位置打开窗口
global type gf_midopenwin from function_object
end type

forward prototypes
global subroutine gf_midopenwin (window w_open)
end prototypes

global subroutine gf_midopenwin (window w_open);Integer li_ScreenH, li_ScreenW
Environment ge_Env
GetEnvironment(ge_Env)

li_ScreenH = PixelsToUnits(ge_Env.ScreenHeight, YPixelsToUnits!)
li_ScreenW = PixelsToUnits(ge_Env.ScreenWidth, XPixelsToUnits!)

w_open.Y = (li_ScreenH - w_open.Height) / 2
w_open.X = (li_ScreenW - w_open.Width) / 2


end subroutine

d_progressbar进度条,w_flash用:

$PBExportHeader$d_progressbar.srd
$PBExportComments$进度条
release 6;
datawindow(units=0 timer_interval=1 color=16777215 processing=0 print.documentname="" print.orientation = 0 print.margin.left = 110 print.margin.right = 110 print.margin.top = 96 print.margin.bottom = 96 print.paper.source = 0 print.paper.size = 0 print.prompt=no print.buttons=no print.preview.buttons=no )
summary(height=0 color="536870912" )
footer(height=0 color="536870912" )
detail(height=80 color="536870912" )
table(column=(type=number updatewhereclause=yes name=maxnumber dbname="maxnumber" )
column=(type=number updatewhereclause=yes name=curnumber dbname="curnumber" )
)
compute(band=detail alignment="2" expression="round( curnumber / maxnumber ,2)"border="5" color="16777215" x="9" y="0" height="80" width="1248~t1250 * (curnumber / maxnumber )" format="0%" font.face="宋体" font.height="-11" font.weight="700" font.family="0" font.pitch="2" font.charset="134" background.mode="2" background.color="16711680" )
column(band=detail id=1 alignment="1" tabsequence=10 border="0" color="0" x="37" y="180" height="88" width="375" format="[general]" name=maxnumber edit.limit=0 edit.case=any edit.autoselect=yes edit.autohscroll=yes font.face="Arial" font.height="-12" font.weight="400" font.family="2" font.pitch="2" font.charset="0" background.mode="1" background.color="536870912" )
column(band=detail id=2 alignment="1" tabsequence=20 border="0" color="0" x="590" y="172" height="88" width="448" format="[general]" name=curnumber edit.limit=0 edit.case=any edit.autoselect=yes edit.autohscroll=yes font.face="Arial" font.height="-12" font.weight="400" font.family="2" font.pitch="2" font.charset="0" background.mode="1" background.color="536870912" )
htmltable(border="1" cellpadding="0" cellspacing="0" generatecss="no" nowrap="yes")
happy00002002 2002-03-14
  • 打赏
  • 举报
回复
如果谁有例子或者这方面的图或控件最好了。。

401

社区成员

发帖
与我相关
我的任务
社区描述
PowerBuilder 非技术版
社区管理员
  • 非技术版社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧