贷款费用估计程序.pptxVIP

  • 0
  • 0
  • 约4.72千字
  • 约 24页
  • 2023-01-18 发布于上海
  • 举报
会计学;控件;3.接着添加与利率有关的控件:一个Label控件和一个ComboBox控件,并设置它们的属性。 控件 属性 值 Label Name LblRate Caption 利率 ComboBox Name CboRate List 4.5,6.25,7, 8.325,9,10 ;4.添加与贷款年限有关的控件:一个Frame控件和一个OptionButton控件组,同时设置它们的属性。 ;控件 属性 值 Frame Name FraTerm Caption 贷款年限 OptionButton Name optLength Caption 10年 Index 0 OptionButton Name optLength Caption 20年 Index 1 OptionButton Name optLength Caption 30年 Index 2 ;5.再来添加三个CommandButton控件,并设置它们的属性。 控件 属性 值CommandButton Namecmd Monthly Caption 月偿还额CommandButton Namecmd Total Caption 偿还总额CommandButton Namecmd Done Caption 关闭 Cancel True;6.请双击“关闭”按钮,在代码窗口中输入语句,该语句将卸载frmLoam窗体。 Private Sub cmdDone_Click() Unload frmLoan End Sub;7.在代码窗口中添加Form_Unload(Cancel As Integer) 事件,并输入需要的代码,该段代码的功能是在退出应用程序之前向用户进行询问,并根据用户的回答执行下一步的操作。 Private Sub Form_Unload(Cancel As Integer) Dim iAnswer As Integer iAnswer = MsgBox(真要退出吗?, vbYesNo) If iAnswer = vbNo Then Cancel = True Else End End If End Sub;8.在开始后面的编程之前,首先在通用声明部分声明一个全局变量mintLength用来表示贷款年限,以及一个全局变量CONV_PERIOD用来表示一年12个月。 Option Explicit Private Const CONV_PERIOD As Integer = 12 Dim mintLength As Integer;9.请双击OptionButton控件,并输入需要的代码语句。 ;Private Sub optLength_Click(Index As Integer) Select Case Index Case 0

文档评论(0)

1亿VIP精品文档

相关文档