Wrox Programmer Forums
|
Beginning VB 6 For coders who are new to Visual Basic, working in VB version 6 (not .NET).
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Beginning VB 6 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old August 11th, 2005, 08:53 AM
Authorized User
 
Join Date: Jul 2005
Posts: 13
Thanks: 0
Thanked 0 Times in 0 Posts
Default number pixel

How can I determine number pixel in resolution?


 
Old August 11th, 2005, 05:08 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 627
Thanks: 0
Thanked 0 Times in 0 Posts
Default

to get the resolution in twips:

screen.twipsperpixelx
screen.twipsperpixely

to get the screen size in pixels and /or mm:

Declare Function GetDeviceCaps Lib "gdi32" _
    (ByVal hdc As Long, ByVal nIndex As Long) As Long

with Index:

Public Const HORZRES = 8 ' Horizontal width in pixels
Public Const HORZSIZE = 4 ' Horizontal size in millimeters
Public Const VERTRES = 10 ' Vertical width in pixels
Public Const VERTSIZE = 6 ' Vertical size in millimeters

Marco





Similar Threads
Thread Thread Starter Forum Replies Last Post
Recording pixel position abhi2086 C# 2005 1 August 4th, 2008 02:59 AM
pixel colour shanthi85 Beginning VB 6 0 May 22nd, 2007 11:23 AM
Pixel lenght of a string bschleusner C# 2005 2 May 9th, 2007 07:35 AM
Query Regarding the pixel CsharpHelp C# 0 May 16th, 2005 11:12 PM
pixel coordinates david.iulian Classic ASP Basics 0 March 31st, 2005 07:03 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.