Tuesday, November 24, 2009

Silverlight and Dual Screen Monitors...

So I'm working on this dual screen kiosk thing and want to use Silverlight as for some reason I can't use WPF / .net4 etc. long story and not the point. What do I do now?

Well along time ago in a galaxy mostly still down the street I used do alot of 'dhtml' or ajax kinds of things or whatever we are calling it now days and there was this little thing called an hta you could do to get around all that silly security stuff in the browser that keeps you from nuking the hard drive, and file system access etc.

So the trick I found is to have the hta host the Silverlight app and have it resize its self to take up all the monitors. with a third monitor hidden in the kiosk... poof, Silverlight dual screen full screen black magic.

for those interested in hta's:

http://msdn.microsoft.com/en-us/library/ms536495(VS.85).aspx

basically you want the following properties set on the hta tag in the html header:

caption=no
contextmenu=no
indderborder=no
border=none
windowstate=normal
scroll=no
showintaskbar=no

and then on load on the body tag execute the following:

window.moveTo(0,0);
window.resizeTo(x,y);

which could be a function of
window.screen.availWidth and or window.screen.availHeight

see black ecma magic saves the day.

9 comments:

  1. is this solve of full screen at dual screen?

    ReplyDelete
  2. kind of. you can have the hta's at full screen at it will work but if you put a sl app at full screen and click on anything on another window then you won't be at full screen any more.

    ReplyDelete
  3. David - I know you posted this several years ago, but I'm wondering if I can tap into your Silverlight expertise if you're still willing. I don't know that your hta fix will resolve my issue, but I thought I'd ask. I (like many other folks) am trying to "fool" my computer into believing that an external display is actually an internal display which will allow me to play Silverlight dependent applications (in this case the Optimum app for laptop) on my television rather than the laptop monitor alone. Can you offer any advice here?

    ReplyDelete
  4. wow... I almost forgot what Silverlight is... :) First why not make duplicate displays? if that doesn't work, why not have the app resize to the screen its on? that should work but if it doesn't I would look at WPF or other technology. I'm not familiar with Optimum. if those ideas don't work let me know and I can think more about it...

    ReplyDelete
  5. The issue is that the app see's the external display and restricts the app from displaying video content. It the app detects an internal display, such as on a laptop, then the app will work. If you connect to a external display on a laptop, then again the app will not work. Any suggestions?

    ReplyDelete
    Replies
    1. I have the same question. have you found a solution yet?

      Delete
  6. I've been looking everywhere, seems like no one has solved this issue yet.

    ReplyDelete
  7. Thanks for sharing the info, keep up the good work going.... I really enjoyed exploring your site. good resource...modem router combo reviews

    ReplyDelete
  8. Intended for Movement 5, clients can just move the generator into the course of events, and afterward change the look. With the 3D camera and light sources accessible in Movement 5, clients can make more looks than any other time in recent memory. Final Cut Pro X Motion Effects

    ReplyDelete