- 1、本文档共3页,可阅读全部内容。
- 2、原创力文档(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。
- 3、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载。
- 4、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
查看更多
Form1
Private Sub Combo1_Click()
For j = 0 To 20
? If Combo1.ListIndex = j Then
? ? Label4.Caption = bianhao(j + 1)
? ? Label5.Caption = danjia(j + 1)
? ? Label8.Caption = danjia(j + 1)
? ? Label10.Caption = peiliao(j + 1)
? ? Picture2.Picture = LoadPicture(App.Path \tupianku\ name1(j + 1) .jpg)
? ? Picture1.PaintPicture Picture2.Picture, 0, 0, Picture1.Width, Picture1.Height
? End If
Next j
End Sub
Private Sub Combo2_Click()
If Combo1.Text = name1(Combo1.ListIndex + 1) Then
? Label8.Caption = danjia(Combo1.ListIndex + 1) * Combo2.Text
? Label10.Caption = peiliao(Combo1.ListIndex + 1)
End If
End Sub
Private Sub Command1_Click()
m = m + 1
ReDim Preserve cai(1 To m), fen(1 To m)
cai(m) = Combo1.ListIndex + 1
fen(m) = Val(Combo2.Text)
End Sub
Private Sub Command2_Click()
fileno = FreeFile
Open App.Path \caidan.txt For Input As #fileno
Do While Not EOF(fileno)
i = i + 1
ReDim Preserve bianhao(i) As String
ReDim Preserve name1(i) As String
ReDim Preserve danjia(i) As Single
ReDim Preserve peiliao(i) As Variant
Input #fileno, bianhao(i), name1(i), danjia(i), peiliao(i)
Loop
Close #fileno
For j = 1 To i
? ? Combo1.AddItem name1(j)
Next j
Combo1.Text = Combo1.List(0)
Combo2.Text = Combo2.List(0)
End Sub
Private Sub Command3_Click()
Form2.Picture1.Cls
n = n + 1
Form2.Show
Form2.Picture1.Print ***********************
Form2.Picture1.Print 第 n 单
Form2.Picture1.Print 编号; Tab(15); 菜品名称; Tab(30); 单价; Tab(45); 数量; Tab(60); 配料; Tab(75); 付款;
Form2.Picture1.Print
For j = 1 To m
? ? f = danjia(cai(j)) * fen(j)
? ? Form2.Picture1.Print bianhao(cai(j)); Tab(15); name1(cai(j)); Tab(30); danjia(cai(j)); Tab(45); fen(j); Tab(60); peiliao(cai(j)); Tab(75); f
? ? Sum = Sum + f
Next j
Form2.Picture1.Print ***********************
Form2.Picture1.Print 共计应付款: Sum 元
End Sub
Private Sub Command4_Click()
End
End Sub
Private Sub Form_Activate()
Dim i As Integer
For i = 1 To 100
Combo2.AddItem i
Next i
End Sub
Form2
Private Sub Command1_Click()
Form1.Show
ReDim Preserve cai(1 To m), fen(1 To m
文档评论(0)