473,386 Members | 1,864 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

PixelsToTwipsX()

Tim
In VB6 we have function PixelsToTwipsX(), what's the equivalent in VB .NET? Thanks.
Nov 20 '05 #1
4 7149
Hi,

http://p2p.wrox.com/archive/pro_wind.../2003-02/6.asp

Ken
---------------
"Tim" <an*******@discussions.microsoft.com> wrote in message
news:FC**********************************@microsof t.com...
In VB6 we have function PixelsToTwipsX(), what's the equivalent in VB
.NET? Thanks.

Nov 20 '05 #2
Tim wrote:
In VB6 we have function PixelsToTwipsX(), what's the equivalent in VB
.NET? Thanks.


Nothing, because there are no twips in VB.NET. It only supports pixels.

--
Sven Groot
Nov 20 '05 #3
"Tim" <an*******@discussions.microsoft.com> schrieb
In VB6 we have function PixelsToTwipsX(), what's the equivalent in VB
.NET? Thanks.


There are no twips anymore, but assuming 1 twip is still 1/1440 inch, the
formula

pixels / g.dpix * 1440

converts pixels to twips, where 'g' is a graphics object. It's available in
OnPaint or the Paint event from the argument e.graphics. Outside these
procedures call thecontrol.creategraphics to get a graphis object (and call
it's dispose method after usage).
--
Armin

How to quote and why:
http://www.plig.net/nnq/nquote.html
http://www.netmeister.org/news/learn2quote.html
Nov 20 '05 #4
* =?Utf-8?B?VGlt?= <an*******@discussions.microsoft.com> scripsit:
In VB6 we have function PixelsToTwipsX(), what's the equivalent in VB
.NET?


Just FMI: Why do you need that?

--
Herfried K. Wagner [MVP]
<URL:http://dotnet.mvps.org/>
Nov 20 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: Raymond 03077 | last post by:
I would like to know how to get started to do the following: I would like to develop a program that acts almost like a macro in the sense when I push a button in VB it retrieves data from my text...
16
by: Neal | last post by:
Hi, I saw the VB6 Code to do this at this link: http://www.dotnet247.com/247reference/msgs/11/56581.aspx The VB6 Code reads as follows: Private Type Rect Left As Long
3
by: Neal Miller | last post by:
Hi Thanks to all of your help, I've got a working PrintRTF module that prints out RTF code, and it works well. The next issue to overcome is to determine how to page-break text that is too long...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.