Playing flash file in vb.net

ε祈祈猫儿з 提交于 2019-12-23 03:24:17

问题


I did some research and come up with this code.

    AxShockwaveFlash1.Stop()
    AxShockwaveFlash1.Movie = Application.StartupPath & "\RSAppt.swf"
    AxShockwaveFlash1.Play()
    playBtn.Enabled = False

I don't know why the video is not playing. My RSAppt.swf file is located at a resources(foldername) folder under my project. Is it the path? What is the right way to direct it to the specific path of my .swf file. Any ideas? Thanks!


回答1:


This should work just fine.

Dim path As String = Application.Startuppath & "\yourfolder\yourfile.swf"

    AxShockwaveFlash1.LoadMovie(0, path)
    AxShockwaveFlash1.Play()
    AxShockwaveFlash1.Loop = False

Happy Coding!!




回答2:


You need to have:

AxShockwaveFlash1.Show()


来源:https://stackoverflow.com/questions/13467108/playing-flash-file-in-vb-net

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!