VML - Problem with fixed width

A

Amitabh

We are using VML in one of the web application.

We need a horizontal line of "fixed width" to be displayed on a web
page. The width for that line MUST NOT change if the resolution or/and
the screen monitor width (laptop vs desktop) change. If the width of
the line is 150 mm, it has to be 150 mm on all the different kind of
screens.

We are not able to achieve this with VML.

I have pasted my code below. The length of the line changes with change
in the screen resolution or in the monitor size. I want it to be always
150mm.

sample code:
-----------------------
<HTML xmlns:v="urn:schemas-microsoft-com:vml">
<HEAD>
<TITLE>VML SAMPLE</TITLE>
<STYLE>
v\:* { behavior: url(#default#VML); }
</STYLE>
</HEAD>
<BODY>
<v:line ID="line1" from="0mm,10mm" to="150mm,10mm"
strokecolor="#A52A2A" strokeweight="1.5pt" print="true"/>
</BODY>
</HTML>
 
R

Ronx

Screens use pixels, not millimetres. Size your graphic in pixels, and
it will be the same size for all screen resolutions.
Or do you mean that the line must be measured with a ruler and be
150mm in length on a 21inch screen with a resolution of 800x600, and
also 150mm in length on a 14inch screen running with a resolution of
1600x1280?
 
A

Amitabh

Thanks for the response.

Yes you guessed it right. The line must be measured with a ruler and be

150mm in length on a 21inch screen with a resolution of 800x600, and
also 150mm in length on a 14inch screen running with a resolution of
1600x1280?

Please let me know with VML whether this is feasible or not.
 
R

Ronx

It is not possible, with any method.
A browser has no way of knowing how big a screen is, except in
pixels - and the physical size of a pixel depends on the screen size
and its resolution. The browser can detect resolution, but not the
physical dimensions of the screen.
 
A

Amitabh

Is there any other alternate that you can suggest to achieve this?
We are thinking of doing some R&D using ActiveX, JNI etc.

Is it possible to determine the physical size of a screen?
 
R

Ronx

No.

Consider a 21inch CRT screen.
How much is used for the picture - exactly - remember with CRT the
visible area is approximately 2inches less than the screen size, and
how approximate is "approximately"?
Can the browser, or your app., tell if its a CRT or LCD screen?
What if the picture is not well adjusted and has 1/2 black border
around it? Or is that 3/4 inch?
If your application can allow for that - it will probably mean human
input to a form of some sort, then maybe you can.
 

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