Embedded Winform resize in 2.0

G

Guest

I have a no-touch application which I created in 1.1. It is embedded within
IE, not a stand-alone window. I'm migrating it to 2.0 and one thing (which is
a major problem) is that the <object> tag doesn't appear to resize within the
browser frame any more. I tested the same code in 1.1 and 2.0 and something
changed. I need to figure out how to change the size of my application when
the browser changes. I've tried a bunch of options including JavaScript but
nothing appears to effect the size of the embedded .net control. Anyone have
any ideas?
 
L

Linda Liu [MSFT]

Hi,

Thank you for posting.

I have created two UserControls in VS.Net2003 and VS2005 respectively. Then
I add them to a html page using the <object> tag. I put a button on the
html page and add a function to handle the click event of the button. In
the button's click event handler, I add code to change the width and height
property of the two embedded objects. Unfornately, both of the embedded
objects' size do not change when I click the button.

The following is the source code of the html page.
<html xmlns="http://www.w3.org/1999/xhtml" >
<head>
<title>Untitled Page</title>
<script language="javascript" type="text/javascript">
function Button1_onclick() {
SimpleControl.style.width = 200;
SimpleControl.style.height = 200;}
</script>
</head>
<body>

<object id="SimpleControl"
classid
="http://localhost/EmbededWinform-2003.dll#EmbededWinform_2003.MyUserControl
"
height="400" width="400"></object>
<br />
<input id="Button1" type="button" value="button" onclick="return
Button1_onclick()" />
</body>
</html>

Could you give me a detail description of your question? I'm looking
forward to your reply.



Sincerely,
Linda Liu
Microsoft Online Community Support

====================================================
When responding to posts,please "Reply to Group" via
your newsreader so that others may learn and benefit
from your issue.
====================================================
 
G

Guest

Hi Linda,

Thanks for your post. I usually just set the width and height to 100% but I
tried you code below (using the button) and I DO see the size change in 1.1
There must be something we are doing differently. I'll gladly send you my
samples (both 1.1 and 2.0) if you just let me know where to send them to.
 
L

Linda Liu [MSFT]

Hi Dave,

Thank you for your reply.

Please send me your samples to my email box. To get my actual email,
please remove "online" from my displayed email address.

Thanks.



Sincerely,
Linda Liu
Microsoft Online Community Support

====================================================
When responding to posts,please "Reply to Group" via
your newsreader so that others may learn and benefit
from your issue.
====================================================
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top