这是对单个的activemovie1进行控制。还可以在“文件”(file)中依次加入子菜单:“打开b画面”(openb)、“打开c画面”(openc),并相应地加入activemovie2、 activemovie3等多个画面,将上述程序代码略为改动后加入。这样,当您按下f5键即运行程序,打开您想要播放的vcd文件就可以欣赏vcd了。在屏幕上单击右键,还可以控制画面呢!
现在是否就满足了呢?不行!我们再增加一个用鼠标任意拖动屏幕的功能:
private sub activemovie1-mousedown (button as integer ,shift as integer ,x as single ,y as single)
activemovie1.drag 1
x1=x
y1=y
end sub
我们还增加了一个定义任意播放时间的主菜单项:“时间”(time)及其子菜单项:“画面a时间”(settimea):
private sub settimea-click ()
on error resume next
dim r as integer
r=inputbox ("请输入时间(分钟:0-60)")
r=r*60
activemovie1.currentposition =int(r)
activemovie1.run
end sub
currentposition是控制vcd播放的时间:(1)activemovie1.currentposition =0(从头开始);(2)activemovie1.currentposition =900(15分钟后);(3)activemovie1.currentpo-sition =1800(30分钟后)。依次类推,但是不能超过60分钟。
我们再增加一个主菜单项:“屏幕”(screen)及其子菜单项:“全屏a”(fullscreena),用来控制屏幕大小:
private sub fullscreena -click ()
on error resume next
activemovie1.fullscreenmode=true
activemovie1.run
activemovie1.moviewindowsize =amvmaximized
end sub
fullscreenmode用来控制画面是否为全屏,当它为true时则全屏方式播放vcd,为false时则取消全屏方式。
moviewindowsize也是控制屏幕的大小:(1)全屏大小:activemovie1.moviewindow-size =amvmaximized;(2)正常大小:activemovie1.moviewindowsize =amvoriginalsize;(3)倍屏:activemovie1.moviewindowsize =amvdoubleoriginalsize;(4)1/2屏:activemovie1.moviewindowsize =amvonehalscreen;(5)1/4屏:activemovie1.movie-windowsize =amvonefourthscreen;(6)1/16屏:activemovie1.moviewindowsize =amvonesixteenscreen。
我们可以随意控制屏幕了。下面,让我们再把声音控制一下吧!
microsoft activemovie控件2.0版的确比1.2、1.0改善不少!1.2、1.0版在我的创新awe64顶级声卡中的表现很不尽人意,但2.0版却把我拉“科达”音箱功能在创新awe64的驱动下发挥得淋漓尽致!想必microsoft 公司对activemovie控制器中内嵌的mpeg音频解码器下了苦功!
我们在菜单中增加主菜单项:“声音”及其子菜单项“增加”(soundadd棗快捷键设置为f4)和“减少”(soundduce棗快捷键设置为f5),分别用来控制声音的增强:
private sub soundadd -click ()
activemovie1.volume= activemovie1.volume +100
end sub
private sub soundduce -click ()
activemovie1.volume= activemovie1.volume -100
end sub
当然,我们还想增加“静音”(soundno)功能。经我反复试验,当activemovie1.volume= -4000时效果最好!
我们还需要让vcd播放完后乖乖地“自动重播”(autoreplay):
private sub autoreplay -click ()
activemovie1.autorewind= true
' autorewind设置播放时是否“自动播放”
end sub
为了让vcd播放时交替“显示帧”(showframe)或“显示时间”(showtime),可在displaymode 中进行设置:
private sub showframe -click ()
on error resume next
activemovie1. displaymode =amvframes
end sub
private sub showtime -click ()
on error resume next
activemovie1. displaymode =amvtimes
end sub
 
2/2 首页 上一页 1 2 |