LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Closed Thread
  Search this Thread
Old 01-19-2012, 06:29 AM   #1
shweta_salve
LQ Newbie
 
Registered: Jan 2012
Posts: 2

Rep: Reputation: Disabled
How to Embed media file in monodevlop Application


hello!!!
im using ubunti 11.10 to create c# application wid the help of monodevelop
im trying to embed media file in my monodevelop app bt i cant achieve it.
i hav written a code to embed mplayer in monodevlop bt it open mplayer exe seperately .i want it to embed in monodevelop widget.so please go through my code:
-----code-----
using System;
using Gtk;
using System.Runtime.InteropServices;

public partial class MainWindow : Gtk.Window
{
private Gtk.Socket socket;
private int xid;

public MainWindow () : base(Gtk.WindowType.Toplevel)
{
Build ();
this.socket = new Socket();
this.socket.WidthRequest = 320;
this.socket.HeightRequest = 240;
this.socket.Visible = true;
this.socket.Realized += new EventHandler(OnVideoWidgetRealized);
this.fixed2.Put(socket, 0, 0);
}

protected virtual void OnVideoWidgetRealized (object sender, EventArgs args)
{
this.xid = (int)socket.Id;
}

protected void OnDeleteEvent (object sender, DeleteEventArgs a)
{
Application.Quit ();
a.RetVal = true;
this.socket = new Socket();
}

protected virtual void OnButton17Clicked (object sender, System.EventArgs e)
{
var paramString = string.Format("-wid {0} -vo x11 -really-quiet -msglevel all=-1 gooddog.wmv", xid);
System.Diagnostics.Process proc = new System.Diagnostics.Process();
proc.StartInfo.FileName = "/usr/bin/mplayer";
proc.StartInfo.Arguments = paramString;
proc.Start();
proc.WaitForExit();
}
}
 
Old 01-19-2012, 06:22 PM   #2
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600
Please post your thread once and in only one forum. Posting a single thread in the most relevant forum will make it easier for members to help you and will keep the discussion in one place. This thread should be closed because it is a duplicate of http://www.linuxquestions.org/questi...cation-924578/.
 
  


Closed Thread



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
How to Embed media file in monodevlop Application shweta_salve Linux - General 0 01-19-2012 06:04 AM
[SOLVED] How can I embed JMF library in java application (Netbean)? hakeemtunde Programming 1 08-09-2011 11:38 AM
How to embed xterm in qt-3 application? maradnus Linux - Newbie 1 10-08-2009 02:45 PM
How can i embed firefox into kde-qt application? ispecial Linux - Software 1 07-06-2005 08:52 PM
embed a media player on the webpage felnlily Linux - Software 1 02-11-2005 10:27 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 11:44 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration