摘要载入中…    请稍等…












内容载入中…    请稍等…

如长时间看不到内容,请关闭浏览器,重新打开此页!

芯友首页 应用软件 编程开发 网络硬件 资源下载 动漫音乐 精美图库 芯友论坛 视频教程 电脑技术QQ群:72845454
 ★★photoshop学友-史上最强播放器★★
 位置:编程开发>VB>VB-API文章
◎→ 本类最新
Win95系统API函数大揭秘
WIN32 API的分类介绍--
WIN32 API的分类介绍--
WIN32 API的分类介绍--
WIN32 API
VB中用API函数实现文件夹列表
VB中利用API函数实现特殊窗体的两
◎→相关资源
C语言入门视频教程
C#编程WinForm入门视频
Asp.net入门视频教程下载
VC++编程视频教程下载
VB窗体文章
HTML入门教程
VB基础视频教程
VB窗体文章
VB文件文章
VB数据库文章
VB-API文章
VB控制文章
◎→ 热门资源
ListBox项的控制
HitTest的妙用
HitTest的妙用
B对低层硬件访问控制
《 VB5中注册控件三法 》
指定文件夹
怎样在DELPHI中使用API函数

一个Format函数


日期:2008-10-20 17:48:18    来源:互联网
   
 ·怎样在DELPHI中使用API函数

一个Format函数 
A new Format function

Visual Basic 5 has the Format command that almost works the same as Print. The difference is that Format shortens the output string length if all the format characters are not used. To work around this I wrote a Public Function called FormatNum.

Public Function FormatNum(MyNumber As Double, FormatStr As String) As String

   注释: This Function returns number formatted as a string
   注释:    with the desired minimum number of characters
   注释: MyNumber - Use CDbl(MyNumber) in the function
   注释:    call to prevent type mismatch error.
   注释:
   FormatNum = Format$(MyNumber, FormatStr)
   If Len(FormatNum) < Len(FormatStr) Then
      FormatNum = Space$(Len(FormatStr) - Len(FormatNum)) & FormatNum
   End If
End Function

Use this function like this:

Print #FileNumber, FormatNum(CDbl(MyVariable), " #### ") 
 [1]

在VB中使用API函数 (之一)

--->OmniFormat V7.6 注册机
--->OmniFormat V7.9
--->飞飞函数图像 V1.1.0.83
--->函数分析工具 V2.0
--->函数图像大师
Tags:  Format 函数

芯友网版权所有 1999-2006 | 著作权与商标声明 | 法律声明 | 服务条款 | 隐私声明 | 联系我们