Click here to Skip to main content
13,049,172 members (63,747 online)
Rate this:
Please Sign up or sign in to vote.
Hi does any one know if it is posseble either to use java code directly in a C# windows/Form application so i can display a youtube video directly on the form and also call event to a chromeless youtube player? or is there an other way around to display a chromeless youtube player on a form?

my first idea was to load a asp webform application into a webbrowser but this gies 2 problems: 1, i cant see a asp site in a webbroser without a asp server witch wont show up if i try to run the asp in a broser. 2, i cant edit the webform from my win-form (disable buttons, call events on form button click etc.)

an other thing i've tried was the shockwave flash player but this is not an option due to lack of events and so on.

I am also using the google and youtube API but it seems they wont be able to show or play a video in anything else than java and .net (asp).

so what i want is a way to have a youtube control (chromeless player) in a win-form that i can call events on and modify basicly everything with my form, and the youtube and google api or even java script if this is possble, if any of you out there could help just some how i would be very thanksfull. TY


my dream could be to have it look abit like this:[^] just displayed in a win-form with possability to call event on the video etc.
Posted 21-Sep-11 9:51am
Updated 21-Sep-11 9:56am
Rate this: bad
Please Sign up or sign in to vote.

Solution 1

Two solutions to run Java in your WinForm
1. Run your java control inside separate process with hidden main window and pass handle of that control to your C# application
2. You can use JNBridge; refer at[^]
Jackssen 22-Sep-11 9:47am
okay ty alot what way would you say is the best to use? i guess running in a separate window may end up in being very messy to work with over time?
Rate this: bad
Please Sign up or sign in to vote.

Solution 2

Hi i've found out that i can make a HTML java page and load it into a webbrowser control and then use webbrowser.document.InvokeScript("scriptname") and on that how do more or less everything i want directly from a button click and so on.
also it works fine with the youtube java api so this is what i've done so far since it is both easy and simple and work very well like i wanted.
Nagy Vilmos 23-Sep-11 6:56am
Mark this as answering your question.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy | Mobile
Web02 | 2.8.170713.1 | Last Updated 22 Sep 2011
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100