控件如下:
1人民币后面的文本框 Text1
2兑换后 后面的文本框 Text2
3退出按钮 Command1
4兑换按钮 Command2
5清除按钮 Command3
6美元单选框 Option1
7港元单选框 Option2
代码如下
Private Sub Command1_Click()
End
End Sub
Private Sub Command2_Click()
Dim HuiLv As Currency
If Option1Value = True Then
HuiLv = 1 / 825 '美元汇率
Else
HuiLv = 1 / 115 '港元
End If
Text2 = CCur(Text1) HuiLv
End Sub
Private Sub Command3_Click()
Text1 = ""
Text2 = ""
Text1SetFocus
End Sub
dim i1 as integer,i2 as integer,i5 as integer,n as integer
n=0
for i1=1 to 30
for i2=1 to 30-i1
i5=30-i1-i2
if i1+i22+i55=100 then
n=n+1
print "第 "& n &" 种,1、2、5元钞票张数分别是:" & i1 &"、"& i2 &"、"& i3
end if
next i2
next i1
字体大小自己设置:
Private Sub Command1_Click()
Command1Enabled = False
Command2Enabled = True
Text1 = Right(Now(), 8)
End Sub
Private Sub Command2_Click()
Command2Enabled = False
Command1Enabled = True
Text2 = Right(Now(), 8)
h1 = CInt(Left(Text1, 2))
m1 = CInt(Mid(Text1, 4, 2))
s1 = CInt(Right(Text1, 2))
h2 = CInt(Left(Text2, 2))
m2 = CInt(Mid(Text2, 4, 2))
s2 = CInt(Right(Text2, 2))
t = 60 (h2 - h1) + m2 - m1 + (s2 - s1) / 60
If t <= 3 Then
y = 05
Else
y = 05 + 015 Int(t - 3 + 0999)
End If
Text3 = y
If Left(Text3, 1) = "" Then Text3 = "0" & Text3
End Sub
Private Sub Form_Load()
Label1Caption = "开始时间"
Label2Caption = "结束时间"
Label3Caption = "通话费用"
Text1 = ""
Text2 = ""
Text3 = ""
Command1Caption = "通话开始"
Command2Enabled = False
Command2Caption = "通话结束"
End Sub
myconConnectionString = ConnString '以connstring为连接数据库的字符串
myconOpen ;打开数据库
strtxtSQL = "select from 基本资料 order by 合同编号"
'此sql语句的意思是选取在基本资料表中的所有记录以合同编号为依据排序(递增)
Set ADORecordset = ExecuteSQL(strtxtSQL) '打开基本资料表
ADORecordsetAddNew '添加一条新记录
ADORecordset!合同编号 = txtIDText
'赋值,将txtid的文本赋值给ADORecordset中的合同编号,以下内容以此类推
ADORecordset!客户名称 = txtNameText
ADORecordset!合同类别 = txtSortText
ADORecordset!所属部门 = txtBranchText
ADORecordset!合同开始日期 = DTPicker1 'txtDateText
ADORecordset!合同结束日期 = DTPicker2
ADORecordset!合同额 = txtPactMoneyText
ADORecordset!已收款 = txtEndMoneyText
ADORecordset!成本 = txtCostText
ADORecordset!已付成本 = txtEndCostText
ADORecordset!应付税金 = txtTaxText
ADORecordset!已付税金 = txtEndTaxText
ADORecordset!未收余额 = txtNotMoneyText
ADORecordset!未付成本 = txtNotCostText
ADORecordset!未付税金 = txtNotTaxText
ADORecordset!项目毛利 = txtGrossProfitText
ADORecordset!可分配毛利 = txtAssignGrossPprofitText
ADORecordset!收款计划 = txtProjectText
ADORecordsetUpdate'更新数据库
' Set mycon = Nothing '释放变量
Set ADORecordset = Nothing '释放变量
myconClose '关闭数据库
Set mycon = Nothing '释放变量
Unload Me '释放自己
Call 合同统计系统Initializtion(0)
For i = 1 To Rows - 1
'库存判断
if conexcute("select count() from 库存表 where 商品编号 = TextMatrix(i, 1) and 库存量>0")>0 then
rsaddnew
rsupdae
end if
next
以上就是关于求VB编程:货币兑换,输入人民币,兑换成美元,比例1:8.25全部的内容,包括:求VB编程:货币兑换,输入人民币,兑换成美元,比例1:8.25、vb语言程序、编写一个vb公用电话计时收费程序等相关内容解答,如果想了解更多相关内容,可以关注我们,你们的支持是我们更新的动力!
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)