Click here to Skip to main content
15,896,118 members
Home / Discussions / C#
   

C#

 
AnswerRe: how to make a customized control box Pin
Heath Stewart5-Jul-04 5:17
protectorHeath Stewart5-Jul-04 5:17 
GeneralPrinting Pin
exhaulted5-Jul-04 0:06
exhaulted5-Jul-04 0:06 
GeneralRe: Printing Pin
exhaulted5-Jul-04 0:21
exhaulted5-Jul-04 0:21 
GeneralConverting Pixels to 100/Inch Pin
exhaulted5-Jul-04 0:59
exhaulted5-Jul-04 0:59 
GeneralRe: Converting Pixels to 100/Inch Pin
Pain_Elemental5-Jul-04 2:19
Pain_Elemental5-Jul-04 2:19 
GeneralRe: Converting Pixels to 100/Inch Pin
Pain_Elemental5-Jul-04 3:53
Pain_Elemental5-Jul-04 3:53 
GeneralRe: Converting Pixels to 100/Inch Pin
exhaulted5-Jul-04 4:21
exhaulted5-Jul-04 4:21 
GeneralRe: Converting Pixels to 100/Inch Pin
Heath Stewart5-Jul-04 5:38
protectorHeath Stewart5-Jul-04 5:38 
The correct way is to P/Invoke GetDeviceCaps and query for the logical pixels / physical pixels using LOGPIXELSX and LOGPIXELSY. Hard-coding numbers like the other guy did will not work on every system, especially these days when more and more displays are moving to 120 DPI as opposed to the currently common 96 DPI.

I've posted code to correctly get the number of pixels per some physical unit (twips, actually, which is 1/1440 of an inch) before. See an example at http://www.codeproject.com/script/comments/forums.asp?msg=829941&forumid=1649#xx829941xx[^].

 

Microsoft MVP, Visual C#
My Articles
GeneralRe: Converting Pixels to 100/Inch Pin
exhaulted5-Jul-04 6:06
exhaulted5-Jul-04 6:06 
GeneralRe: Converting Pixels to 100/Inch Pin
Heath Stewart5-Jul-04 6:27
protectorHeath Stewart5-Jul-04 6:27 
GeneralRe: Converting Pixels to 100/Inch Pin
exhaulted5-Jul-04 23:50
exhaulted5-Jul-04 23:50 
GeneralRe: Converting Pixels to 100/Inch Pin
Heath Stewart6-Jul-04 4:21
protectorHeath Stewart6-Jul-04 4:21 
GeneralRay Picking Pin
ghho5-Jul-04 0:04
ghho5-Jul-04 0:04 
Generalenum and inheritance Pin
Anonymous4-Jul-04 23:39
Anonymous4-Jul-04 23:39 
GeneralRe: enum and inheritance Pin
hatim_ali5-Jul-04 2:12
hatim_ali5-Jul-04 2:12 
GeneralRe: enum and inheritance Pin
Anonymous5-Jul-04 3:50
Anonymous5-Jul-04 3:50 
GeneralRe: enum and inheritance Pin
Heath Stewart5-Jul-04 5:40
protectorHeath Stewart5-Jul-04 5:40 
GeneralRe: enum and inheritance Pin
leppie5-Jul-04 7:16
leppie5-Jul-04 7:16 
GeneralRe: enum and inheritance Pin
Anonymous5-Jul-04 22:58
Anonymous5-Jul-04 22:58 
GeneralGet Url from IE Pin
olreit4-Jul-04 22:57
olreit4-Jul-04 22:57 
GeneralRe: Get Url from IE Pin
eggie56-Jul-04 13:24
eggie56-Jul-04 13:24 
GeneralCasting String to Long Pin
hatim_ali4-Jul-04 22:52
hatim_ali4-Jul-04 22:52 
GeneralRe: Casting String to Long Pin
Stefan Troschuetz4-Jul-04 23:05
Stefan Troschuetz4-Jul-04 23:05 
GeneralRe: Casting String to Long Pin
hatim_ali4-Jul-04 23:24
hatim_ali4-Jul-04 23:24 
GeneralTime Validation Pin
dabuskol4-Jul-04 22:36
dabuskol4-Jul-04 22:36 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.