PageSetupDialog转换毫米/英寸问题 [英] PageSetupDialog conversion millimeters/inch problem
本文介绍了PageSetupDialog转换毫米/英寸问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我使用PageSetupDialog和EnableMetric。
描述我的问题。
我打开PageSetupDialog并设置10毫米的边距。
我按'好的',然后重新打开对话框。边距的新值等于9.91。
我知道问题是从毫米到英寸的转换。
如果有任何方法可以解决这个问题吗?
解决方案
这是一个错误,一个已知的确定。
公制/英制转换是其中一个你可以说它是在美国写的东西,他们肯定喜欢他们的帝国系统。
此处 [ ^ ]是一个M
页面,附有解释和支持。
我一直在使用PageSetupDialog中的爆破毫米挣扎
我所有的计算机都是加拿大地区的美国键盘,默认为公制单位。
我讨厌舍入错误。
我更喜欢INCHES,所以不要手动重新配置所有计算机,我只需添加这些代码行来告诉计算机上的所有程序我更喜欢英寸。
进口IWshRuntimeLibrary
Dim oShell As IWshShell_Class
oShell = New IWshShell_Class
oShell.RegWrite(HKEY_CURRENT_USER \Control Panel \ International \ iMeasure,1)
Imeasure = 0 =公制
Imeasure = 1 =英寸
您可以在程序中阅读此设置
Bool系统.Globalization.RegionInfo.CurrentRegion.IsMetric
I use PageSetupDialog with EnableMetric.
Description my problem.
I open PageSetupDialog and set margins on 10 millimeters.
I press 'OK', and reopen dialog. Margins have new value equals 9.91.
I know that problem is with conversion from millimeters to inch.
If is any way to resolve this isue?
解决方案
It's a bug, a known one to be sure.
The Metric/Imperial conversion is one of those things where you can tell it was written in The States, they sure love their Imperial System.
Here[^] is a M
page with explanations and support.
I have been struggling with the blasted millimetres in the PageSetupDialog
All of my computers are Region CANADA with US Keyboard, it defaults to metric units.
I hate the rounding errors.
I prefer INCHES, so instead of manually reconfiguring ALL the computers, I just add these lines of code to tell ALL PROGRAMS on the computer that I prefer inches.
Imports IWshRuntimeLibrary
Dim oShell As IWshShell_Class
oShell = New IWshShell_Class
oShell.RegWrite("HKEY_CURRENT_USER\Control Panel\International\iMeasure", 1)
Imeasure =0=Metric
Imeasure =1=Inches
You can read this setting in your program with
Bool System.Globalization.RegionInfo.CurrentRegion.IsMetric
这篇关于PageSetupDialog转换毫米/英寸问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文