northwolves[狼行天下] 的专栏

无知无惧,无欲无敌。

VB计算圆周率(二)

采用普遍的傅立叶级数展开方法pi = 3 + (1 * 1) / (2 * 3 * 4) * [ 3 + (3*3)/(4*5*4) *[ 3 + (5*5)/(6*7*4) * [ 3 + (7*7)/(8*9*4) * [ ... ] ] ] ]输入:需计算的圆周率位数,理论精度约5万位 Ad...

2006-06-07 09:15:00

阅读数:3931

评论数:1

递归方法巧解不定方程(二)

笔者在2004年曾写过一篇 递归方法巧解不定方程 。昨天在一位网友的启发下,对代码进行了重写,使其能够设置每个变量的取值范围。代码如下Private Sub Command1_Click()Dim min(1 To 5) As Integer, max(1 To 5) As Integer, RE...

2006-06-07 09:05:00

阅读数:1479

评论数:0

VB计算圆周率

采用普遍的傅立叶级数展开方法 pi=2+1/3*(2+2/5*(2+3/7*(2+4/9*(2+5/11  .....))))))输入:需计算的圆周率位数,理论精度约30万位 Add a commandbutton and textbox(multine=true,scrollbars=both)...

2006-06-06 09:30:00

阅读数:5558

评论数:0

设置文本框的九种对齐方式(左上,中上,右上,左中,中中,右中,左下,中下,右下)

Add a commandbutton and a textbox( multiline=true) and copy the following codes to form1:Private Declare Function SendMessage Lib "user32" ...

2006-06-05 12:00:00

阅读数:2532

评论数:0

EXCELSHEET 中"输入”或“编辑”状态与“就绪”状态的切换

Private Declare Sub Sleep Lib "kernel32" (ByVal dwMilliseconds As Long)Sub Macro1()Dim i As IntegerFor i = 1 To 5   Sheet1.Range("D10&...

2006-06-04 07:59:00

阅读数:2031

评论数:0

已知三角形三个边的长度值,求三个角的大小

没什么技术含量,一个余弦定理搞定:Function angle(ByVal a As Double, ByVal b As Double, ByVal c As Double)angle = (b * b + c * c - a * a) / (2 * b * c)angle = Atn(-ang...

2006-06-04 07:54:00

阅读数:3889

评论数:0

获取路径名的原始大小写状态

方法1:利用dir()循环:------------------------------------Option ExplicitPrivate Sub Command1_Click()Dim s As Strings = "c:/program files/microsoft offi...

2006-06-04 07:44:00

阅读数:1143

评论数:0

VB实现小数和分数的相互转化

Function fenshu(ByVal xiaoshu As Single, Optional ByVal jingdu As Integer = 3) As String 小数转换为分数,误差小于0.1^jingduDim i As LongDoi = i + 1Loop Until Abs...

2006-06-03 21:21:00

阅读数:2997

评论数:0

提示
确定要删除当前文章?
取消 删除
关闭
关闭