|
-
May 5th, 2000, 10:46 PM
#1
Thread Starter
Lively Member
As a little expierement, I want to do some calculations on pixles in an image. How do I get the number of pixles in X and Y directions... so I can create a table of the same size.. thanks..
-
May 6th, 2000, 02:41 AM
#2
transcendental analytic
What scales are you using? To convert between pixels and twips use twipsperpixelx and twipsperpixely
Use  
writing software in C++ is like driving rivets into steel beam with a toothpick.
writing haskell makes your life easier:
reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.
-
May 6th, 2000, 04:18 AM
#3
Frenzied Member
screen Resolution
I am using VB6 & Windows 98, Second Edition. I have Visual Studio installed on my System.
The following resulted in values like (640 & 480), (800 & 600), (1024 & 768), et cetera.
Code:
Dim PixelsX As Integer
Dim PixelsY As Integer
PixelsX = Screen.Width / Screen.TwipsPerPixelX
PixelsY = Screen.Height / Screen.TwipsPerPixelYl
I have been experimenting with resizing Forms & Picture Boxes when Screen Resolution changes. The above worked for me. I do not think it is necessary, but my form had a Sysinfo Control (Try adding one, if the above does not work for you).
Some of the data from the system is still confusing to me. For example: Form Width & Height seem to be measured in "Logical" Twips (No change when Screen Resolution changes, and the size of the Form has obviously changed). Screen Width & Height seem to be measured in Absolute Twips, changing when Screen Resolution changes. Note that WorkArea Width & Height take the size of the Task Bar into account.
The VB documentation has often omitted some crucial data, so I advise experimenting.
Live long & prosper.
The Dinosaur from prehistoric era prior to computers.
Eschew obfuscation!
If a billion people believe a foolish idea, it is still a foolish idea!
VB.net 2010 Express
64Bit & 32Bit Windows 7 & Windows XP. I run 4 operating systems on a single PC.
-
May 6th, 2000, 05:38 PM
#4
PowerPoster
If you mean the size like you get it from the iPictureDisp object you have to scale them by form:
Code:
x = Form1.ScaleX( Form1.Picture.Width )
y = Form1.ScaleY( Form1.Picture.Height )
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|