⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 getnumberformat.htm

📁 vb的api函数
💻 HTM
字号:
<html>

<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">

<style><!--
body,table {font-family:"宋体"; font-size: 9pt; line-height:11pt;}
a {text-decoration:none} a:hover {color:red;text-decoration:underline}
--></style>
<title>GetNumberFormat</title>
</head>

<body background="../../../images/gray_weave.gif" link="#FF0000" vlink="#FF0000" alink="#FF0000" bgcolor="#FFC8C8">


<div align="center"><center>

<table border="0" width="100%" height="22" cellspacing="0" cellpadding="0">
  <tr>
    <td width="100%" height="16"><a name="GetNumberFormat,GetNumberFormatBynum">GetNumberFormat,GetNumberFormatBynum</a></td>
  </tr>
</table>
</center></div><div align="center"><center>

<table border="1" width="100%" bordercolorlight="#808080" cellspacing="0"
bordercolordark="#FFFFFF">
  <tr>
    <td width="102%" colspan="2">VB声明</td>
  </tr>
  <tr>
    <td width="102%" colspan="2">Declare Function GetNumberFormat&amp; Lib 
    &quot;kernel32&quot; Alias &quot;GetNumberFormatA&quot; (ByVal Locale As Long, ByVal 
    dwFlags As Long, ByVal lpValue As String, lpFormat As NUMBERFMT, ByVal lpNumberStr As 
    String, ByVal cchNumber As Long)<br>
    Declare Function GetNumberFormatBynum&amp; Lib &quot;kernel32&quot; Alias 
    &quot;GetNumberFormatA&quot; (ByVal Locale As Long, ByVal dwFlags As Long, ByVal lpValue 
    As String, ByVal lpFormat As Long, ByVal lpNumberStr As String, ByVal cchNumber As Long)</td>
  </tr>
  <tr>
    <td width="102%" colspan="2">说明</td>
  </tr>
  <tr>
    <td width="102%" colspan="2">针对指定的“地方”,按特定的格式格式化一个数字</td>
  </tr>
  <tr>
    <td width="102%" colspan="2">返回值</td>
  </tr>
  <tr>
    <td width="102%" colspan="2">Long,格式化过后的字串的长度。零表示出错。会将<a
    href="GetLastError.htm">GetLastError</a>设为下述值之一:ERROR_INSUFFICIENT_BUFFER,ERROR_INVALID_FLAGS,ERROR_INVALID_PARAMETER</td>
  </tr>
  <tr>
    <td width="102%" colspan="2">参数表</td>
  </tr>
  <tr>
    <td width="25%">参数</td>
    <td width="77%">类型及说明</td>
  </tr>
  <tr>
    <td width="25%">Locale</td>
    <td width="77%">Long,决定了具体格式的地方ID。lpFormat参数(如果不为NULL)指定的任何信息都优先于各“地方”不同的特定信息</td>
  </tr>
  <tr>
    <td width="25%">dwFlags</td>
    <td width="77%">Long,如指定了lpFormat,这个参数应为零。否则,可设为LOCALE_NOUSEROVERRIDE,强制使用系统地方参数——无论用户是否已作出相应的修改</td>
  </tr>
  <tr>
    <td width="25%">lpValue</td>
    <td width="77%">String,欲格式化的数字。数字可以只有数位、加在前面的一个“-”号以及一个小数点</td>
  </tr>
  <tr>
    <td width="25%">lpFormat</td>
    <td width="77%">NUMBERFMT,可设为NULL,表示使用本地特有的值(倘若用GetNumberFormatBynum,则可将这个参数以ByVal 
    As Long的形式传递)。否则,可引用一个NUMBERFMT结构,其中的各个字段载入欲使用的格式信息</td>
  </tr>
  <tr>
    <td width="25%">lpNumberStr</td>
    <td width="77%">String,指定一个缓冲区,用于装载格式化过后的字串。注意先初始化成合适的长度</td>
  </tr>
  <tr>
    <td width="25%">cchNumber</td>
    <td width="77%">Long,lpNumberStr缓冲区的长度。如为零,函数会返回缓冲区必要的长度</td>
  </tr>
</table>
</center></div><div align="center"><center>

<table border="0" width="100%" cellspacing="0" cellpadding="0">
  <tr>
    <td width="100%"><p align="right"><a href="#GetNumberFormat,GetNumberFormatBynum">Top</a></td>
  </tr>
</table>
</center></div>


</body>
</html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -