精华区 [关闭][返回]

当前位置:网易精华区>>讨论区精华>>编程开发>>● Powerbuilder>>使用API>>动画窗口的例程(ilike提供)

主题:动画窗口的例程(ilike提供)
发信人: ilike()
整理人: leitiger(2002-06-05 23:49:05), 站内信件
把下面的代码import进来,然后直接run这个窗口即可。




$PBExportHeader$w_animate.srw
$PBExportComments$动画窗口
forward
global type w_animate from Window
end type
type mle_1 from multilineedit within w_animate
end type
end forward

global type w_animate from Window
int X=823
int Y=360
int Width=2048
int Height=1276
boolean TitleBar=true
string Title="Animate Window"
long BackColor=79741120
boolean ControlMenu=true
boolean MinBox=true
boolean MaxBox=true
boolean Resizable=true
mle_1 mle_1
end type
global w_animate w_animate

type prototypes
function boolean AnimateWindow ( long hwnd, long dwtime, long dwflags 
) library "user32"
end prototypes
type variables
constant long  AW_HOR_POSITIVE      = 1
constant long AW_HOR_NEGATIVE =  2
constant long AW_VER_POSITIVE =  4
constant long AW_VER_NEGATIVE = 8
constant long AW_CENTER = 16
constant long AW_HIDE =   65526
constant long AW_ACTIVATE   =  131072
constant long AW_SLIDE = 262144
constant long AW_BLEND = 524288

end variables
on w_animate.create
this.mle_1=create mle_1
this.Control[]={this.mle_1}
end on

on w_animate.destroy
destroy(this.mle_1)
end on

event open;long ll_handle 
ll_handle = Handle ( This )
Randomize ( 0 )
Choose Case rand ( 6 )
Case 1
AnimateWindow ( ll_handle, 1000, AW_SLIDE +  AW_VER_POSITIVE + AW_AC
TIVATE )
Case 2
AnimateWindow ( ll_handle, 1000, AW_SLIDE +  AW_VER_NEGATIVE+ AW_ACT
IVATE )
Case 3
AnimateWindow ( ll_handle, 1000, AW_SLIDE +  AW_HOR_POSITIVE +  AW_A
CTIVATE )
Case 4
AnimateWindow ( ll_handle, 1000, AW_SLIDE +  AW_HOR_NEGATIVE +  AW_A
CTIVATE )
Case 6,5
AnimateWindow ( ll_handle, 1000, AW_SLIDE +  AW_CENTER + AW_ACTIVATE
 )
End Choose


end event
event close;long ll_handle 
ll_handle = Handle ( This )

AnimateWindow ( ll_handle, 300, AW_SLIDE +   AW_HIDE + AW_CENTER )


end event
type mle_1 from multilineedit within w_animate
int X=201
int Y=144
int Width=1541
int Height=796
int TabOrder=10
BorderStyle BorderStyle=StyleLowered!
string Text="by like: club.nease.com PB论坛版主"
long TextColor=33554432
int TextSize=-12
int Weight=400
string FaceName="Arial"
FontCharSet FontCharSet=Ansi!
FontFamily FontFamily=Swiss!
FontPitch FontPitch=Variable!
end type


--
※ 来源:.月光软件站 http://www.moon-soft.com.[FROM: 202.96.156.11]

[关闭][返回]