Re: Clip capture - thanks Mike!



On Fri, 2 Dec 2005 14:26:10 -0600, "ProfitMaxTrading.com"
<nospam@xxxxxxxxxxxxxx> wrote:

>If it ain't broke, don't fix it.
>
>Oh my head hurts. I went through my code changing things to vbPixels and
>then ended up with a mess on my hands. Turns out, that I did not know, that
>the Screen.object is in vbTwips. So my conversions got a bit goofy and I had
>to go back and change things to the way they were, only to find that it was
>not so easy to do! I've finally found the last few 'changes' and got them
>back to the way it 'was'.

When doing anything radical, backup first
- ideally have a simple BAT file that Zips all the relevant source
( I've suffered the same agony frequently )

>The BIG problem I see here is that some things in VB are default vbTwips and
>some things (API) is default vbPixels. This gets really confusing.

It gets worse, there are also HiMetrics

>But I believe all is back to normal and now I can focus on saving my picture
>in GIF format. BTW, you should have gotten the GIF files by now. Let me know
>if you did not.
>
>:-)
>
>
>
>"Mike Williams" <Mike@xxxxxxxxxxxxxxxxx> wrote in message
>news:dmq64u$2pu$1@xxxxxxxxxxxxxxxxxxxxxxx
>> "ProfitMaxTrading.com" <nospam@xxxxxxxxxxxxxx> wrote in message
>> news:Q30kf.11239$QW2.3667@xxxxxxxxxxxxx
>>
>>> Why in the world did they come up with Twips then? Doesn't
>>> make sense if the smallest division is Pixel.
>>
>> It's just another "real world" unit of measurement (by "real world" I mean
>> things like inches, centimetres, stuff like that). A twip is actually a
>> subdivision of a "point", which is a unit of measurement used mostly in
>> the printing industry for hundreds of years (a point is 1/72 of an inch).
>> When the printing industry became more sophisticated and could print stuff
>> with greater accuracy they had a need for a unit of measurement that was
>> smaller than a point. They came up with a "twip", which is short for "one
>> twentieth of a point". There are as I've already said 72 points in one
>> inch, as so it follows that there are 1440 twips in one inch. So, a twip
>> is just another "real world" unit of measurement. By the way, as with most
>> things with a historical background, there are people who will argue with
>> this "English" description and will start to talk about "Didot points" and
>> "French Royal Inches" and stuff like that. Take no notice of them ;-) The
>> French historically were "not quite happy with anything English" and
>> French printers had their own twips and their own points and their own
>> inches (which were, of course, not quite the same size as English points
>> and English twips and English inches). Sadly (for them) those antiquated
>> "French" units of measurement are no longer in general use!
>>
>> There are very good reasons why Microsoft originally chose to use a "real
>> world" unit of measurement (such as a twip) for the size of VB Forms and
>> stuff (mostly to do with their "Windows font size" stuff which allows
>> users with poor eyesight to see things on their monitors at a slightly
>> larger size and which is too complicated to explain in detail in this
>> message). However, it all turned out to be more trouble than it was worth
>> and they have now ditched the idea and gone back to pixels in their dotnet
>> stuff (as far as I know - I've never actually tried dotnet).
>>
>> As far as units of measurement themselves are concerned, any graphs and
>> arcs and circles and things you draw can be held in great detail in the
>> actual VB code (so that, for example, you can calculate with great
>> accuracy the height of a sine wave at any given point in its cycle simply
>> by using Singles or Doubles). It's only when you come to displaying it on
>> the screen (and reading the displayed screen pixels) that you are limited
>> by the pixel resolution of the display. It doesn't actually matter in
>> practice though, because generally the screen display is purely for
>> "looking at", and it doesn't need to be drawn with absolute accuracy. The
>> limited resolution of the display does not prevent you from storing the
>> data itself in your VB variables with as much accuracy as you want.
>>
>> Mike
>>
>>
>>
>>
>>
>>
>>
>
>

.



Relevant Pages

  • Re: Picture in image control gets cliped "Sometimes" does not stay flu
    ... the width of the picture in the Image control. ... This will almost certainly be because your code is not properly taking into acount the differences in the Windows dots per inch (or twips per pixel) setting on different machines. ... The only time it will fail to do this is if the pixel size of the display on which your code is running is not sufficient to display such a Form, in which case it will make the client area as large as it can under the circumstances. ...
    (microsoft.public.vb.general.discussion)
  • Re: Form is truncated.....
    ... Most machines run at 96 dpi (15 twips per pixel) but quite a lot run at 120 dpi and some at various other settings. ... All good applications, whether they are VB applications or not, always need to check the display on which they are running and adjust themselves accordingly. ...
    (microsoft.public.vb.general.discussion)
  • Re: Form Disappears
    ... show frmVolume at the fronm of the ZOrder. ... which on standard machines running at 15 twips per pixel is ... this code on a 800 x 600 pixel display (if, as I assume, you've got ...
    (comp.lang.basic.visual.misc)
  • Re: TwipsPerPixel
    ... by the way, just in case you are wondering why the Windows settings mention dpi when you asked about twips per pixel it is just that twips and inches have a defined and fixed relationship to each other, so the same thing can be said in more than one way. ... There are in fact 1440 twips in one inch, so a machine that has 96 pixels per inch also has 1440/96 twips per pixel. ... MsgBox Me.ScaleX(1, vbInches, vbPixels) & _ ...
    (microsoft.public.vb.general.discussion)
  • Re: Picture in image control gets cliped "Sometimes" does not stay
    ... the width of the picture in the Image control. ... per logical inch (the equivalent of 15 twips per pixel) whereas others run ... exactly the same "twip size" as the design time twip size client area on ...
    (microsoft.public.vb.general.discussion)