在Windows Media Player中显示静止和视频文件 [英] displaying still and video files in windowsmediaplayer

查看:97
本文介绍了在Windows Media Player中显示静止和视频文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何通过vb.net中的AxWindowsMediaPlayer以编程方式链接jpeg/jpg/bmp和音频/视频文件

How to programmatically link jpeg/jpg/bmp and audio/video files with AxWindowsMediaPlayer in vb.net

推荐答案

以下代码播放选定的歌曲文件
只需一个OpenFileDialog控件和一个按钮控件即可.
在按钮上编写以下代码
The following code Play the Selected Song File
Just Take one OpenFileDialog Control and One Button Control.
On Button Write the following Code
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
       If OpenFileDialog1.ShowDialog = Windows.Forms.DialogResult.OK Then
           AxWindowsMediaPlayer1.URL = OpenFileDialog1.FileName
       End If
   End Sub


当您单击按钮"时,选择歌曲文件"后即会打开文件"对话框,它将自动在AxWindowsMediaPlayer中显示.


When you click on Button the File Dialog Box opensafter selecting the Song File it automatically Paly in AxWindowsMediaPlayer.


这篇关于在Windows Media Player中显示静止和视频文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆