如何在VLC播放器中放置按钮 [英] How do I put a button in a VLC player
本文介绍了如何在VLC播放器中放置按钮的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在使用VLC制作媒体播放器。我在c#项目中设计了一个winform,并使用P / invoke来使用函数libvlc_media_player_set_hwnd。媒体可以播放。但是我无法看到我放入播放器的按钮。我想有一个butten。我该怎么办?
这是我的代码。
I am making a media player using VLC. I designed a winform in c# project and using P/invoke to use the function "libvlc_media_player_set_hwnd". The media could be played. But it could not be seen that the butten I put in the player. I would like there is a butten. What should I do?
Here is my code.
public Form1()
{
InitializeComponent();
int res = VLC.VLC_load(Player.Handle);
}
private void button1_Click(object sender, EventArgs e)
{
int res = VLC.VLC_play("D:\\tmp2\\3.rmvb");
}
public static class VLC
{
[DllImport("MagicPlayer.dll")]
public extern static int VLC_load(IntPtr window);
[DllImport("MagicPlayer.dll")]
public extern static int VLC_go_back_to_last_stop();
[DllImport("MagicPlayer.dll")]
public extern static int VLC_pause();
[DllImport("MagicPlayer.dll")]
public extern static int VLC_play(string fileName);
[DllImport("MagicPlayer.dll")]
public extern static int VLC_release();
}
它可以运行。但是,当我把butten放入播放器时,这是一个泛神。无法看到。
It can run. But when I put the butten into the the Player which is a panal. It can't be seen.
推荐答案
Hello Water,
您的问题是如何在winform中插入按钮。在这里参考这个
Hello C ++ / CLI - 第1部分 [ ^ ]
其他明智的人开始用你的代码写出更易理解的问题,以便其他人可以帮助你:)最好的:))
Hello Water,
The question from you is how to insert button in winform.Here you go refer this
Hello C++/CLI - Part 1[^]
Other wise pls start writing better understandable questions with your code,So that others can help you out:)All the best:)
这篇关于如何在VLC播放器中放置按钮的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文