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.

18 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. Great things you’ve always shared with us. Just keep writing this kind of posts.The time which was wasted in traveling for tuition now it can be used for studies.Thanks
    best-led-christmas-lights

    ReplyDelete
  9. Great things put in this blog, thank you so much for sharing with us this informative blog. Visit Ogen Infosystem to get creative and responsive website designing services.
    Website Designing Company in Delhi

    ReplyDelete
  10. Amazing blog, thank you so much for sharing with us. Get the best Shipping Services by Y&H Cargo India.
    Freight Forwarders in India

    ReplyDelete
  11. Nice Information presented you by this blog, thank you so much for sharing this informative blog. Visit for Mutual Find Schemes and Advisors.
    Mutual Funds India

    ReplyDelete
  12. Nice Blog, Visit for the daily lifestyle activities and about Health, Wealth and Lifestyle Events by Lifestyle Magazine in India.
    Lifestyle Magazine

    ReplyDelete
  13. thanks for sharing this
    you can also check best laptop in 300

    ReplyDelete
  14. Visit for the Commercial Vehicle Wrap and Vinyl Signage Printing Services by Kalakutir Pvt Ltd.
    Commercial Vehicle Wrap

    ReplyDelete
  15. Mostly I use to read the blogs and informative article daily, but today i found your blog very unique, providing the information and helpful to others. Keep it up and waiting for your new updates thanks. We offer multiple services in digital marketing, some of our services are:

    Digital marketing Company in Delhi
    SMM Services
    PPC Services in Delhi
    Website Design & Development Packages
    SEO Services Packages
    Local SEO services
    E-mail marketing services
    YouTube plans
    Digital marketing service in Delhi

    ReplyDelete
  16. designing high-quality shower and warming lights. Explore our collection of quality and reliable led shower lights & more!

    ReplyDelete