admin 管理员组

文章数量: 1086019


2024年3月10日发(作者:中学生javascript书籍)

程序:

'在PictureBox控件中显示GIF动画(图片),凡有句柄hwnd的窗体控件均可以

'在窗体Form1上添加2个命令按钮Command1,Command2和1个图片框控件

Picture1

Option Explicit

'调用运动图像类型库,在c:windowssystem32目录下

Private pMC As FilgraphManager '定义pMC为FilgraphManager对象

Private pVW As IVideoWindow '定义pVW为IVideoWindow对象

Private Sub Form_Load()

ode = 3

ode = 3

On Error Resume Next

Set pMC = New FilgraphManager

File ""

'加载GIF文件

On Error GoTo Lhandle

File & "护士.gif" '加载GIF动画(图片)

On Error Resume Next

Set pVW = pMC

Style = CLng(&H6000000)

'限定动画在Picture1的大小中

= 0: = 0

=

=

= '在Picture1中显示

eDrain = '此行非常重要,用来定义动画的右键菜单所

必须


本文标签: 动画 定义 控件 图片 添加