找回密码
 注册会员
查看: 3522|回复: 6

这里有没有VB高手呀!求助啦

[复制链接]
发表于 2006-7-29 19:18:17 |Error| 显示全部楼层 |阅读模式

我们不再是孤独的探索者;让我们的手紧紧相连,一起成长。

您需要 登录 才可以下载或查看,没有账号?注册会员

×
<p>本人想编一个VB程序计算输送机的水平动力、垂直动力、及总动力等。本人有计算公式。窗口等介面都设计好了,有输入数据的TextBox和输出计算结果的TextBox,这个计算过程是怎样的一个思路呢?求助!!!</p><p>如果哪位大哥有类似程序的源码请留给小弟一观,就是类似这样的一个程序http://cncad.net/viewFile.asp?BoardID=22&amp;ID=1616。 <a href="mailto:我是初学者!syws52@126.com">我是初学者!syws52@126.com</a></p><p></p>
发表于 2006-7-29 19:37:24 |Error| 显示全部楼层
呵呵,有VB低手,偶也在学,去明经CAD看看吧,
回复 顶 踩

使用道具 举报

发表于 2006-7-30 08:03:34 |Error| 显示全部楼层
<p>楼主看看这段小程序,也许会有点帮助!</p><p></p><p>''''这是一个胶带机功率简单计算的程序''''<br/>''''本程序可以用于共享学习之用,如用作商业用途,请告知作者<a href="mailtoYMX12345@126.COM">LYMX12345@126.COM</a>&nbsp;''''</p><p>Option Explicit</p><p>rivate Sub Form_Load()<br/>&nbsp;&nbsp;&nbsp; Dim L, B, LO, qj, dj, p, k, V, Q, H, N1, N, A, A1, A2, ts, dsxs<br/>B:<br/>&nbsp;&nbsp;&nbsp; B = InputBox("请输入带宽(mm)", Me.Caption &amp; "--数据输入", 500)<br/>&nbsp;&nbsp;&nbsp; If B = "" Then End<br/>&nbsp;&nbsp;&nbsp; If B = "400" Or B = "500" Or B = "650" Or B = "800" Or B = "1000" Or B = "1200" _<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Or B = "1400" Or B = "1600" Or B = "1800" Or B = "2000" Then<br/>&nbsp;&nbsp;&nbsp; Else: GoTo B<br/>&nbsp;&nbsp;&nbsp; End If<br/>&nbsp;&nbsp;&nbsp; B = Val(B)<br/>&nbsp;&nbsp;&nbsp; If B = 400 Then<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; LO = 160<br/>&nbsp;&nbsp;&nbsp; ElseIf B = 500 Then<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; LO = 200<br/>&nbsp;&nbsp;&nbsp; ElseIf B = 650 Then<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; LO = 250<br/>&nbsp;&nbsp;&nbsp; ElseIf B = 800 Then<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; LO = 315<br/>&nbsp;&nbsp;&nbsp; ElseIf B = 1000 Then<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; LO = 380<br/>&nbsp;&nbsp;&nbsp; ElseIf B = 1200 Then<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; LO = 465<br/>&nbsp;&nbsp;&nbsp; ElseIf B = 1400 Then<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; LO = 530<br/>&nbsp;&nbsp;&nbsp; ElseIf B = 1600 Then<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; LO = 600<br/>&nbsp;&nbsp;&nbsp; ElseIf B = 1800 Then<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; LO = 670<br/>&nbsp;&nbsp;&nbsp; ElseIf B = 2000 Then<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; LO = 750<br/>&nbsp;&nbsp;&nbsp; End If<br/>&nbsp;&nbsp;&nbsp; ts = "带&nbsp;&nbsp;&nbsp; 宽:" &amp; B &amp; "mm"<br/>L:<br/>&nbsp;&nbsp;&nbsp; L = InputBox(ts &amp; Chr(10) &amp; Chr(10) &amp; "请输入水平机长(m)", Me.Caption &amp; "--数据输入")<br/>&nbsp;&nbsp;&nbsp; If L = "" Then End<br/>&nbsp;&nbsp;&nbsp; If L &gt; 3 And L &lt; 20000 Then<br/>&nbsp;&nbsp;&nbsp; Else: GoTo L<br/>&nbsp;&nbsp;&nbsp; End If<br/>&nbsp;&nbsp;&nbsp; ts = ts &amp; Chr(10) &amp; "水平机长:" &amp; L &amp; "m"<br/>qj:<br/>&nbsp;&nbsp;&nbsp; qj = InputBox(ts &amp; Chr(10) &amp; Chr(10) &amp; "请输入倾角(°)", Me.Caption &amp; "--数据输入", 0)<br/>&nbsp;&nbsp;&nbsp; If qj = "" Then End<br/>&nbsp;&nbsp;&nbsp; qj = Val(qj)<br/>&nbsp;&nbsp;&nbsp; If qj &lt;= 6 Then<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; k = 1<br/>&nbsp;&nbsp;&nbsp; ElseIf qj &lt;= 8 Then<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; k = 0.96<br/>&nbsp;&nbsp;&nbsp; ElseIf qj &lt;= 10 Then<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; k = 0.94<br/>&nbsp;&nbsp;&nbsp; ElseIf qj &lt;= 12 Then<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; k = 0.92<br/>&nbsp;&nbsp;&nbsp; ElseIf qj &lt;= 14 Then<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; k = 0.9<br/>&nbsp;&nbsp;&nbsp; ElseIf qj &lt;= 16 Then<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; k = 0.88<br/>&nbsp;&nbsp;&nbsp; ElseIf qj &lt;= 18 Then<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; k = 0.85<br/>&nbsp;&nbsp;&nbsp; ElseIf qj &lt;= 20 Then<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; k = 0.81<br/>&nbsp;&nbsp;&nbsp; ElseIf qj &lt;= 22 Then<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; k = 0.76<br/>&nbsp;&nbsp;&nbsp; Else<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; GoTo qj<br/>&nbsp;&nbsp;&nbsp; End If<br/>&nbsp;&nbsp;&nbsp; ts = ts &amp; Chr(10) &amp; "倾&nbsp;&nbsp;&nbsp; 角:" &amp; qj &amp; "°"<br/>p:<br/>&nbsp;&nbsp;&nbsp; p = InputBox(ts &amp; Chr(10) &amp; Chr(10) &amp; "请输入物料松散密度密度(t/m3)", Me.Caption &amp; "--数据输入", 0.9)<br/>&nbsp;&nbsp;&nbsp; If p = "" Then End<br/>&nbsp;&nbsp;&nbsp; p = Val(p)<br/>&nbsp;&nbsp;&nbsp; If p &lt; 0.1 Or p &gt; 2.5 Then GoTo p<br/>&nbsp;&nbsp;&nbsp; ts = ts &amp; Chr(10) &amp; "松散密度:" &amp; p &amp; "t/m3"</p><p>dj:<br/>&nbsp;&nbsp;&nbsp; dj = InputBox(ts &amp; Chr(10) &amp; Chr(10) &amp; "请输入物料安息角(°)", Me.Caption &amp; "--数据输入", 30)<br/>&nbsp;&nbsp;&nbsp; If dj = "" Then End<br/>&nbsp;&nbsp;&nbsp; dj = Val(dj)<br/>&nbsp;&nbsp;&nbsp; If p &lt; 0 Or p &gt; 60 Then GoTo dj</p><p>&nbsp;&nbsp;&nbsp; A1 = Tan(dj * 0.92 * (3.1415926 / 180)) * ((LO / 1000 + (0.9 * B / 1000 - 0.05 - LO / 1000) * 0.86602540378) ^ 2) / 6<br/>&nbsp;&nbsp;&nbsp; A2 = (LO / 1000 + ((0.9 * B / 1000) - 0.05 - (LO / 1000)) * 0.4330127) * (0.9 * B / 1000 - 0.05 - (LO / 1000)) * 0.25<br/>&nbsp;&nbsp;&nbsp; A = A1 + A2<br/>&nbsp;&nbsp;&nbsp; ts = ts &amp; Chr(10) &amp; "安 息 角:" &amp; dj &amp; "°"</p><p>V:<br/>&nbsp;&nbsp;&nbsp; V = InputBox(ts &amp; Chr(10) &amp; Chr(10) &amp; "请输入带速(m/s)", Me.Caption &amp; "--数据输入", 1.25)<br/>&nbsp;&nbsp;&nbsp; If V = "" Then End<br/>&nbsp;&nbsp;&nbsp; If V &gt; 0 And V &lt; 5 Then<br/>&nbsp;&nbsp;&nbsp; Else: GoTo V<br/>&nbsp;&nbsp;&nbsp; End If<br/>&nbsp;&nbsp;&nbsp; V = Val(V)<br/>&nbsp;&nbsp;&nbsp; If V &lt;= 1.6 Then<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; dsxs = 1<br/>&nbsp;&nbsp;&nbsp; ElseIf V &lt;= 2.5 Then<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; dsxs = 0.95<br/>&nbsp;&nbsp;&nbsp; ElseIf V &lt;= 3.15 Then<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; dsxs = 0.9<br/>&nbsp;&nbsp;&nbsp; ElseIf V &lt;= 4# Then<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; dsxs = 0.8<br/>&nbsp;&nbsp;&nbsp; Else<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; dsxs = 0.76<br/>&nbsp;&nbsp;&nbsp; End If<br/>&nbsp;&nbsp;&nbsp; ts = ts &amp; Chr(10) &amp; "带&nbsp;&nbsp;&nbsp; 速:" &amp; V &amp; "m/s"<br/>H:<br/>&nbsp;&nbsp;&nbsp; H = InputBox(ts &amp; Chr(10) &amp; Chr(10) &amp; "请输入提升高(m)", Me.Caption &amp; "--数据输入", Val(Format(Val(L) * Tan(qj * (3.1415926 / 180)), "###.###")))<br/>&nbsp;&nbsp;&nbsp; If H = "" Then End<br/>&nbsp;&nbsp;&nbsp; ts = ts &amp; Chr(10) &amp; "提 升 高:" &amp; H &amp; "m"<br/>Q:<br/>&nbsp;&nbsp;&nbsp; Q = InputBox(ts &amp; Chr(10) &amp; Chr(10) &amp; "请输入输送量(t/h)", Me.Caption &amp; "--数据输入", CLng(A * 3600 * Val(V) * k * p * dsxs))</p><p>&nbsp;&nbsp;&nbsp; If Q = "" Then End<br/>&nbsp;&nbsp;&nbsp; If Val(Q) = 0 Then GoTo Q<br/>&nbsp;&nbsp;&nbsp; ts = ts &amp; Chr(10) &amp; "输 送 量:" &amp; Q &amp; "t/h"</p><p>&nbsp;&nbsp;&nbsp; N1 = (0.36 * (40 + L) * (B - 300) * V + (40 + L) * Q) / 10000 + 0.00273 * Q * H<br/>&nbsp;&nbsp;&nbsp; N = N1 / 0.85<br/>&nbsp;&nbsp;&nbsp; If N &lt; 1 Then N = "0" &amp; N<br/>&nbsp;&nbsp;&nbsp; MsgBox ts &amp; Chr(10) &amp; Chr(10) &amp; "计算所需功率&nbsp; " &amp; Val(CCur(N)) &amp; "千瓦", , "胶带机功率计算(六月梦雪)"<br/>&nbsp;&nbsp;&nbsp; End<br/>End Sub<br/></p>
回复 顶 踩

使用道具 举报

发表于 2006-7-30 08:05:14 |Error| 显示全部楼层
<p>楼主看看下面这段源码,也许有点帮助!希望大家也多多共享呀</p><p>''''这是一个胶带机功率简单计算的程序''''<br/>''''本程序可以用于共享学习之用,如用作商业用途,请告知作者<a href="mailtoYMX12345@126.COM">LYMX12345@126.COM</a>&nbsp; ''''<br/>Option Explicit</p><p>rivate Sub Form_Load()<br/>&nbsp;&nbsp;&nbsp; Dim L, B, LO, qj, dj, p, k, V, Q, H, N1, N, A, A1, A2, ts, dsxs<br/>B:<br/>&nbsp;&nbsp;&nbsp; B = InputBox("请输入带宽(mm)", Me.Caption &amp; "--数据输入", 500)<br/>&nbsp;&nbsp;&nbsp; If B = "" Then End<br/>&nbsp;&nbsp;&nbsp; If B = "400" Or B = "500" Or B = "650" Or B = "800" Or B = "1000" Or B = "1200" _<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Or B = "1400" Or B = "1600" Or B = "1800" Or B = "2000" Then<br/>&nbsp;&nbsp;&nbsp; Else: GoTo B<br/>&nbsp;&nbsp;&nbsp; End If<br/>&nbsp;&nbsp;&nbsp; B = Val(B)<br/>&nbsp;&nbsp;&nbsp; If B = 400 Then<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; LO = 160<br/>&nbsp;&nbsp;&nbsp; ElseIf B = 500 Then<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; LO = 200<br/>&nbsp;&nbsp;&nbsp; ElseIf B = 650 Then<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; LO = 250<br/>&nbsp;&nbsp;&nbsp; ElseIf B = 800 Then<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; LO = 315<br/>&nbsp;&nbsp;&nbsp; ElseIf B = 1000 Then<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; LO = 380<br/>&nbsp;&nbsp;&nbsp; ElseIf B = 1200 Then<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; LO = 465<br/>&nbsp;&nbsp;&nbsp; ElseIf B = 1400 Then<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; LO = 530<br/>&nbsp;&nbsp;&nbsp; ElseIf B = 1600 Then<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; LO = 600<br/>&nbsp;&nbsp;&nbsp; ElseIf B = 1800 Then<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; LO = 670<br/>&nbsp;&nbsp;&nbsp; ElseIf B = 2000 Then<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; LO = 750<br/>&nbsp;&nbsp;&nbsp; End If<br/>&nbsp;&nbsp;&nbsp; ts = "带&nbsp;&nbsp;&nbsp; 宽:" &amp; B &amp; "mm"<br/>L:<br/>&nbsp;&nbsp;&nbsp; L = InputBox(ts &amp; Chr(10) &amp; Chr(10) &amp; "请输入水平机长(m)", Me.Caption &amp; "--数据输入")<br/>&nbsp;&nbsp;&nbsp; If L = "" Then End<br/>&nbsp;&nbsp;&nbsp; If L &gt; 3 And L &lt; 20000 Then<br/>&nbsp;&nbsp;&nbsp; Else: GoTo L<br/>&nbsp;&nbsp;&nbsp; End If<br/>&nbsp;&nbsp;&nbsp; ts = ts &amp; Chr(10) &amp; "水平机长:" &amp; L &amp; "m"<br/>qj:<br/>&nbsp;&nbsp;&nbsp; qj = InputBox(ts &amp; Chr(10) &amp; Chr(10) &amp; "请输入倾角(°)", Me.Caption &amp; "--数据输入", 0)<br/>&nbsp;&nbsp;&nbsp; If qj = "" Then End<br/>&nbsp;&nbsp;&nbsp; qj = Val(qj)<br/>&nbsp;&nbsp;&nbsp; If qj &lt;= 6 Then<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; k = 1<br/>&nbsp;&nbsp;&nbsp; ElseIf qj &lt;= 8 Then<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; k = 0.96<br/>&nbsp;&nbsp;&nbsp; ElseIf qj &lt;= 10 Then<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; k = 0.94<br/>&nbsp;&nbsp;&nbsp; ElseIf qj &lt;= 12 Then<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; k = 0.92<br/>&nbsp;&nbsp;&nbsp; ElseIf qj &lt;= 14 Then<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; k = 0.9<br/>&nbsp;&nbsp;&nbsp; ElseIf qj &lt;= 16 Then<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; k = 0.88<br/>&nbsp;&nbsp;&nbsp; ElseIf qj &lt;= 18 Then<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; k = 0.85<br/>&nbsp;&nbsp;&nbsp; ElseIf qj &lt;= 20 Then<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; k = 0.81<br/>&nbsp;&nbsp;&nbsp; ElseIf qj &lt;= 22 Then<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; k = 0.76<br/>&nbsp;&nbsp;&nbsp; Else<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; GoTo qj<br/>&nbsp;&nbsp;&nbsp; End If<br/>&nbsp;&nbsp;&nbsp; ts = ts &amp; Chr(10) &amp; "倾&nbsp;&nbsp;&nbsp; 角:" &amp; qj &amp; "°"<br/>p:<br/>&nbsp;&nbsp;&nbsp; p = InputBox(ts &amp; Chr(10) &amp; Chr(10) &amp; "请输入物料松散密度密度(t/m3)", Me.Caption &amp; "--数据输入", 0.9)<br/>&nbsp;&nbsp;&nbsp; If p = "" Then End<br/>&nbsp;&nbsp;&nbsp; p = Val(p)<br/>&nbsp;&nbsp;&nbsp; If p &lt; 0.1 Or p &gt; 2.5 Then GoTo p<br/>&nbsp;&nbsp;&nbsp; ts = ts &amp; Chr(10) &amp; "松散密度:" &amp; p &amp; "t/m3"</p><p>dj:<br/>&nbsp;&nbsp;&nbsp; dj = InputBox(ts &amp; Chr(10) &amp; Chr(10) &amp; "请输入物料安息角(°)", Me.Caption &amp; "--数据输入", 30)<br/>&nbsp;&nbsp;&nbsp; If dj = "" Then End<br/>&nbsp;&nbsp;&nbsp; dj = Val(dj)<br/>&nbsp;&nbsp;&nbsp; If p &lt; 0 Or p &gt; 60 Then GoTo dj</p><p>&nbsp;&nbsp;&nbsp; A1 = Tan(dj * 0.92 * (3.1415926 / 180)) * ((LO / 1000 + (0.9 * B / 1000 - 0.05 - LO / 1000) * 0.86602540378) ^ 2) / 6<br/>&nbsp;&nbsp;&nbsp; A2 = (LO / 1000 + ((0.9 * B / 1000) - 0.05 - (LO / 1000)) * 0.4330127) * (0.9 * B / 1000 - 0.05 - (LO / 1000)) * 0.25<br/>&nbsp;&nbsp;&nbsp; A = A1 + A2<br/>&nbsp;&nbsp;&nbsp; ts = ts &amp; Chr(10) &amp; "安 息 角:" &amp; dj &amp; "°"</p><p>V:<br/>&nbsp;&nbsp;&nbsp; V = InputBox(ts &amp; Chr(10) &amp; Chr(10) &amp; "请输入带速(m/s)", Me.Caption &amp; "--数据输入", 1.25)<br/>&nbsp;&nbsp;&nbsp; If V = "" Then End<br/>&nbsp;&nbsp;&nbsp; If V &gt; 0 And V &lt; 5 Then<br/>&nbsp;&nbsp;&nbsp; Else: GoTo V<br/>&nbsp;&nbsp;&nbsp; End If<br/>&nbsp;&nbsp;&nbsp; V = Val(V)<br/>&nbsp;&nbsp;&nbsp; If V &lt;= 1.6 Then<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; dsxs = 1<br/>&nbsp;&nbsp;&nbsp; ElseIf V &lt;= 2.5 Then<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; dsxs = 0.95<br/>&nbsp;&nbsp;&nbsp; ElseIf V &lt;= 3.15 Then<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; dsxs = 0.9<br/>&nbsp;&nbsp;&nbsp; ElseIf V &lt;= 4# Then<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; dsxs = 0.8<br/>&nbsp;&nbsp;&nbsp; Else<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; dsxs = 0.76<br/>&nbsp;&nbsp;&nbsp; End If<br/>&nbsp;&nbsp;&nbsp; ts = ts &amp; Chr(10) &amp; "带&nbsp;&nbsp;&nbsp; 速:" &amp; V &amp; "m/s"<br/>H:<br/>&nbsp;&nbsp;&nbsp; H = InputBox(ts &amp; Chr(10) &amp; Chr(10) &amp; "请输入提升高(m)", Me.Caption &amp; "--数据输入", Val(Format(Val(L) * Tan(qj * (3.1415926 / 180)), "###.###")))<br/>&nbsp;&nbsp;&nbsp; If H = "" Then End<br/>&nbsp;&nbsp;&nbsp; ts = ts &amp; Chr(10) &amp; "提 升 高:" &amp; H &amp; "m"<br/>Q:<br/>&nbsp;&nbsp;&nbsp; Q = InputBox(ts &amp; Chr(10) &amp; Chr(10) &amp; "请输入输送量(t/h)", Me.Caption &amp; "--数据输入", CLng(A * 3600 * Val(V) * k * p * dsxs))</p><p>&nbsp;&nbsp;&nbsp; If Q = "" Then End<br/>&nbsp;&nbsp;&nbsp; If Val(Q) = 0 Then GoTo Q<br/>&nbsp;&nbsp;&nbsp; ts = ts &amp; Chr(10) &amp; "输 送 量:" &amp; Q &amp; "t/h"</p><p>&nbsp;&nbsp;&nbsp; N1 = (0.36 * (40 + L) * (B - 300) * V + (40 + L) * Q) / 10000 + 0.00273 * Q * H<br/>&nbsp;&nbsp;&nbsp; N = N1 / 0.85<br/>&nbsp;&nbsp;&nbsp; If N &lt; 1 Then N = "0" &amp; N<br/>&nbsp;&nbsp;&nbsp; MsgBox ts &amp; Chr(10) &amp; Chr(10) &amp; "计算所需功率&nbsp; " &amp; Val(CCur(N)) &amp; "千瓦", , "胶带机功率计算(六月梦雪)"<br/>&nbsp;&nbsp;&nbsp; End<br/>End Sub<br/></p>
回复 顶 踩

使用道具 举报

发表于 2006-7-30 08:17:45 |Error| 显示全部楼层
<p>不好意思,上面的帖子发重复了 </p><p>编译过的程序 YPDBPEGC.rar (142.17 KB, 下载次数: 17) <br/></p>
回复 顶 踩

使用道具 举报

 楼主| 发表于 2006-7-30 13:46:34 |Error| 显示全部楼层

谢谢上面的贴子,本人正在参考中!有价值

<p>谢谢上面的贴子,本人正在参考中!有价值</p><p>但是我想做的那个计算程序输入数值和输出数据在一个窗口里面,"计算”按钮的源码怎么写呢?</p><p><a href="mailto:syws52@126.com">syws52@126.com</a></p>
回复 顶 踩

使用道具 举报

发表于 2010-6-3 11:58:28 |Error| 显示全部楼层
都是高手啊!!!
回复 顶 踩

使用道具 举报

您需要登录后才可以回帖 登录 | 注册会员

本版积分规则

闭关者|手机版|© 2005-2026|Cncad.Net ( 苏ICP备2026083443号 )|网站地图

GMT+8, 2026-11-4 08:24 , Processed in 0.312369 second(s), 32 queries .

Powered by Discuz! X5.0

© 2001-2026 Discuz! Team.

快速回复 返回顶部 返回列表