I want to write a "visual experience" in .NET and expose it as an HTML
hosted .NET applet. How is this done? An MSDN search for ".NET applet" only
returns one result - the page from the MCE SDK :-)
So, what the heak is a .NET applet, and how do I use it in Media Center.
This page: http://www.codeproject.com/dotnet/CSharpApplet.asp provides a
clue to .NET applets, but I still don't understand how to host them in MCE.
I've read that in Vista, MCE add-ins will be able to provide UI elements.
But for now it looks like I'll have to host it in HTML.
Thanks in advance!
Once I figured that out there was a ton of info on using hosted .NET windows
forms controls in web pages. Pretty straightforward.
However, I didn't see anything which indicated how to use these without a
web server. All the doucmentation said that the html page containing the
control as well as the control assembly (i.e. the .dll) should reside in a
virtual directory on the web server.
If I want to install the assembly and html page local in a file for MCE how
to I refer to it? I tried adding it to the global assembly cache but that
didn't work. The html syntax for including a .NET windows forms control is:
<OBJECT id="MyControl" classid="myassembly.dll#MyAppletControl.MyApplet>
</OBJECT>
Where do I put the html, the .dll, and how do I modify the above syntax to
point to it?
Thanks!
classid="myassembly.dll#MyAppletControl.MyApplet"
to specify your .Net control then the assembly has to be hosted by a web
server. If you want your code to live in the local file system then you need
a couple of changes.
Have a look at the following knowledge base article for details.
http://support.microsoft.com/default.aspx/kb/317346/EN-US/
Cheers
"wolfman" <wol...@discussions.microsoft.com> wrote in message
news:3D6FDF9C-600C-4115...@microsoft.com...
In this case do I have the flexibility to write my windows form control in
.NET 2.0? I'm starting a clean project and would like to use the most
current methods available.
Do a search for activex on www.thegreenbutton.com. Or do a search for my
posts as h_arted. I have uploaded an activex template that will show you how
to com register a winform .net assembly and use it in an html page. If you
look at my mce game mcepeaks at www.10footgames.net you will see that this
is what you are trying to do.
Dean
"wolfman" <wol...@discussions.microsoft.com> wrote in message
news:1DC0681A-0D45-483B...@microsoft.com...
I couldn't find your template - you've got quite a few posts on
thegreenbutton.com. If you can point me to it that would be great.
Did you develop mcepeaks as an ActiveX application, or as a .NET application
exposed as activex using com interop? I successfully implemented a .NET 1.1
framework "hello world" application and exposed it using comm interop. My
current problem is that I was intending to use a 3rd party purchased .NET
control as a component of my applet which I write for MCE. That didn't work.
I gotta keep banging my head on the desk until it works - hopefully soon!
At least I'm learning a lot.
-JSS
Have a look here
http://www.thegreenbutton.com/community/shwmessage.aspx?ForumID=30&MessageID=137195
Go to the third post and download the template.
mcepeaks was created as a .Net control that is COM enabled. It is then
loaded into the HTML document.
h_arted
"wolfman" <wol...@discussions.microsoft.com> wrote in message
news:4BCC5F0C-E223-44D6...@microsoft.com...
Thanks,
casey
<sup...@10footgames.net> wrote in message
news:edD8qraJ...@TK2MSFTNGP09.phx.gbl...
now i'm wondering if you can host a .NET 2.0 WinForm control in MCE 2005, or
if its also limited to .NET 1.1?
"casey chesnut" <casey@MORE_SPAMbrains-N-brawn.com> wrote in message
news:%239wqJib...@tk2msftngp13.phx.gbl...
You have tested the .NET control and they work with extenders? Cool! Not
having access to one, they cost about the same amount as a full blown mce in
the UK, I have not been able to test my game.
The .NET control, stretched to the full screen, works a charm. After years,
yes, years or trial and error, this is the absolute BEST way to develop .NET
application for the media center. No more crappy HTML to work with, graphics
on the fly, animation the way you want it, thread and process control... All
good. There are a few things that need to be dealt with, scaling of
graphics, controls on the main control snatch the focus from the main
control and makes navigation a problem but when you understand the issues,
it is easy as pie.
When you develop something new, you create it as a normal .NET application
and you can cut and paste it into a new AXtemplate, change the GUIDs and
things and off you go. Working mce app with the full power of the .NET
framework.
I see no reason why framework 2.0 will not work. After all, by developing
this way, we remove the MCE add-ins interface all together. You can pass the
MCE object from the HTML to the ActiveX object which can then use it to do
various things like create MCE dialogs etc.
If you have not done so already, check out what I have done with mcepeaks
V2.0, www.10footgames.net, and if possible, test it on the extender for me
please.
Thanks
Dean
"casey chesnut" <casey@MORE_SPAMbrains-N-brawn.com> wrote in message
news:umnB1EdJ...@TK2MSFTNGP10.phx.gbl...
really wish i would have known about this technique earlier,
for some reason i thought it was ActiveX controls only.
Thanks,
casey
<sup...@10footgames.net> wrote in message
news:u1EPfcnJ...@TK2MSFTNGP10.phx.gbl...
--
Michael Creasy [MS]
http://www.michaelcreasy.com/blog
"casey chesnut" <casey@MORE_SPAMbrains-N-brawn.com> wrote in message
news:umnB1EdJ...@TK2MSFTNGP10.phx.gbl...
"Michael Creasy - [MS]" <mcr...@online.microsoft.com> wrote in message
news:ulv9Zuo...@TK2MSFTNGP09.phx.gbl...
I am not ready to move to 2.0 yet so it won't be me. Thanks for testing
mcepeaks for me. Great to know that it does work.
Casey, If you need to know more about this and the potential problems, let
me know.
Dean
"casey chesnut" <casey@MORE_SPAMbrains-N-brawn.com> wrote in message
news:OUU5mCpJ...@TK2MSFTNGP12.phx.gbl...
Instead ehExtHost.exe is launched which itself contains .net 1.1 code, so
the .net 1.1 virtual machine is loaded. The ehExtHost.exe then hosts the IE
browser control which loads your HTML add-in and ehExtHost.exe also provides
the MCE object model to the browser control.
Since the .net 1.1 virtual machine would've been loaded already into the
ehExtHost process before the browser control tries to load your .net 2.0
controls you're snookered.
Cheers
<sup...@10footgames.net> wrote in message
news:Oa2p1LpJ...@TK2MSFTNGP09.phx.gbl...
Thanks for the link to the template for the .NET control. I only wish I had
seen it earlier, would have saved me a ton of time. I figured out most of
this eventually, but your shell cleared up a few more things for me.
I agree strongly that a .NET control which is COM enabled is definatly the
way to go. You're example should be added to the MCE SDK!
Thanks,
casey
"wolfman" <wol...@discussions.microsoft.com> wrote in message
news:3C5BBBD1-AD4A-4BA6...@microsoft.com...