Click here to Skip to main content
Rate this: bad
good
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
 
-Jackie
 
- EDIT:
my dream could be to have it look abit like this: http://code.google.com/intl/da-DK/apis/youtube/youtube_player_demo.html[^] just displayed in a win-form with possability to call event on the video etc.
Posted 21-Sep-11 10:51am
Edited 21-Sep-11 10:56am
v3
Rate this: bad
good
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 http://www.jnbridge.com/[^]
  Permalink  
Comments
Jackssen at 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
good
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.
  Permalink  
Comments
Nagy Vilmos at 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
0 Marcin Kozub 330
1 OriginalGriff 256
2 Sergey Alexandrovich Kryukov 215
3 Praneet Nadkar 197
4 Richard MacCutchan 182
0 OriginalGriff 8,048
1 Sergey Alexandrovich Kryukov 7,287
2 DamithSL 5,614
3 Manas Bhardwaj 4,986
4 Maciej Los 4,910


Advertise | Privacy | Mobile
Web03 | 2.8.1411023.1 | Last Updated 22 Sep 2011
Copyright © CodeProject, 1999-2014
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