Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9216745
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T02:28:57+00:00 2026-06-18T02:28:57+00:00

I do very simple thing: I need to change VIDEO tag size via InvokeScript

  • 0

I do very simple thing: I need to change VIDEO tag size via InvokeScript of WPF WebBrowser control.

So it shows “Hello” but size doesn’t changes at all.

Note: If i open this page directly it changes size fine for any browser.

private void btSize_Click(object sender, RoutedEventArgs e)
{
   wb.InvokeScript("SetVideoSize");
}

function SetVideoSize() {

            try {
                document.getElementById("player1").style.height = '400px';
                document.getElementById("player1").style.width = '400px';
                alert('Hello2');
  } catch (e) {
               // alert(e.Message);
            }
        }



 <video width="10" height="10" style="margin: 0 !important; padding: 0 !important;
        overflow: hidden;" id="player1" name="mplayer1"  src="http://mysite.com/files/werweB"  type="video/mp4">
    </video>
     <script type="text/javascript">       
        MediaElement('player1', 
        {
            success: function (me) {
                me.play();
            }
        }); 
    </script>

I even tried to do:

mshtml.HTMLDocument doc = (mshtml.HTMLDocument)wb.Document;
var player = doc.getElementById("player1");
player.setAttribute("width", "400");
player.setAttribute("height", "400");

But there is no any visual changes at all…

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-18T02:28:58+00:00Added an answer on June 18, 2026 at 2:28 am

    I spent two days searching and this is what I found:

    All you have to do is add the following meta tag to your HTML:

    <meta http-equiv="X-UA-Compatible" content="IE=9" >
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I need to ask a very simple thing. Probably many of you might already
A very simple thing, and I can't get it to work. I want to
Here's a very simple thing I'd like to do: when the pointer is within
This might be a very simple thing. Check out the normal sql query below
I would like to do a very simple thing but I am quite lost.
I'm trying to do a very simple thing: Read a diff from a git
I am trying to achieve a very simple thing in MATLAB. I have a
I need a very simple shell script that processes all images on a folder
I'm hoping this question has a very simple answer. I can think of ways
I am sure there is a very simple answer to this question, I think

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.