|
-
May 14th, 2006, 05:43 PM
#1
Thread Starter
Lively Member
TwipsPerPixel Change
Is there a way to Change my Computer TwipsPerPixel Now it's
TwipsPerPixelX,Y = 15
But i like to change it but i don't now how to do that.
any one got info please help me it's for testing
imosha
-
May 14th, 2006, 05:50 PM
#2
Re: TwipsPerPixel Change
TwipsPerPixelX/Y are settings related to your resolution, and changes (if possible) would completely change the look of everything (not just in your application).
What are you actually trying to do?
-
May 14th, 2006, 06:07 PM
#3
Re: TwipsPerPixel Change
If you are doing this for testing, try going into Control Panel - Display...
Go to the Settings Tab and select the Advanced button.
Change the DPI settings to CUSTOM and then drag that ruler left and right to see what values you can arrive at.
I'm not sure this changes the TWIPSPERPIXEL, but it does change the PIXELS per INCH that the display processes with.
-
May 14th, 2006, 08:26 PM
#4
Thread Starter
Lively Member
Re: TwipsPerPixel Change
First Thank you
Hell what can i do
is there a way to make my program work in 96Dpi
even if the user Selected defrant DPI
please say yes and what is the way?
-
May 14th, 2006, 09:02 PM
#5
Re: TwipsPerPixel Change
My guess would be that there is an API call to check or change the DPI value - but I've never had any need to do something like this...
Sorry.
-
May 15th, 2006, 07:37 AM
#6
Re: TwipsPerPixel Change
 Originally Posted by imosha
is there a way to make my program work in 96Dpi
even if the user Selected defrant DPI
The important point is why do you want to?
If you want your form to look "right" at different resolutions, see the thread about it in the Classic VB FAQ for some tips.
If you want to print something at a certain DPI, then change what/how you print.
If it's something different, we'll need to know what it is.
-
May 15th, 2006, 08:17 AM
#7
Re: TwipsPerPixel Change
I have to agree with Si - it's important to make your application fit to the layout, size and arrangement of the display properties that a user selects.
It is not reasonable to change the users settings when your app is run.
I am disappointed in how my app may look when someone selects "large fonts" - but I would rather see that and attempt to adjust.
I might not be happy when the first wide-screen but-small-display trys my app and it blows up trying to re-size the form to fit - but I would rather it happens and I can correct it.
People select odd themes and colors...
-
May 15th, 2006, 08:27 AM
#8
Re: TwipsPerPixel Change
 Originally Posted by szlamany
People select odd themes and colors...
God knows that is the truth.
 Originally Posted by szlamany
I am disappointed in how my app may look when someone selects "large fonts" - but I would rather see that and attempt to adjust.
I would take this one step further and say that I've been down right disgusted by some of the things people have do to my apps with respect to how they look. However, we are not creating this applications for ourselves. We are creating them for our customer, and if that is what they want, it is our responsibility to see that that is what they get.
-
May 15th, 2006, 08:31 AM
#9
Thread Starter
Lively Member
Re: TwipsPerPixel Change
to fix this problam i need to work a long long long time and im not going to that yet
with all the respecte to the user
if i work so hard it's my lost and not the user lost
any way it's not safe to say that i can fix this error in my program
Thank you all
Last edited by imosha; May 15th, 2006 at 08:44 AM.
-
May 15th, 2006, 08:43 AM
#10
Re: TwipsPerPixel Change
 Originally Posted by imosha
The probalm is that All my Control Moves Same Are The Same And Same are changed
Yes but if you move same in the same but other direction while still sizing same on same but other it wouldn't be same but different . Sorry, but did that make any more sense to you than it did to me? 
You can use the GetDeviceCaps API function to determent which DPI setting the current display is using. However you can't obviously have different DPI settings for different application shown by the same graphic card.
-
May 15th, 2006, 11:42 AM
#11
Thread Starter
Lively Member
Re: TwipsPerPixel Change
 Originally Posted by Joacim Andersson
Yes but if you move same in the same but other direction while still sizing same on same but other it wouldn't be same but different  . Sorry, but did that make any more sense to you than it did to me?
 lol No
You can use the GetDeviceCaps API function to determent which DPI setting the current display is using. However you can't obviously have different DPI settings for different application shown by the same graphic card.
Q. if i have a textBox and i like to Make the Text And the textBox larger in Pixels is there a way to do that ?
Last edited by imosha; May 15th, 2006 at 11:46 AM.
-
May 15th, 2006, 12:53 PM
#12
Re: TwipsPerPixel Change
Yes, change the width and the height properties of the textbox. If you set the ScaleMode property of the Form to vbPixels all controls on it will be messured in pixels instead of in twips.
-
May 15th, 2006, 05:18 PM
#13
Thread Starter
Lively Member
Re: TwipsPerPixel Change
 Originally Posted by Joacim Andersson
Yes, change the width and the height properties of the textbox. If you set the ScaleMode property of the Form to vbPixels all controls on it will be messured in pixels instead of in twips.
thank you
that i didn't need to do i select VBPixels in start
what i need to say is
if my screnn Fonts are 10 Pixels Height in normal DPI
and what is like is that my Fonts will B 10 Pixels Height in NOT normal DPI
any way i stop working on that
maybe next week it's will be ease to search for API Call than working like a Dog to Fix Error's
Thank you all for traying
-
May 16th, 2006, 04:30 AM
#14
Re: TwipsPerPixel Change
Just so you know... you can find out the size of text (height or width) in a particular font by using the TextWidth or TextHeight methods of the form, eg:
VB Code:
Text1.Height = Me.TextHeight("Text to show") + 6
'6 is the (estimated) size of the border, in pixels
..note that to do this, the Font of the form needs to be the same as the font of the Textbox.
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
|