我duno如何将代码从放入框中转移到文本框中 [英] i duno how to transfer the code from in put box to text box in form

查看:117
本文介绍了我duno如何将代码从放入框中转移到文本框中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我没有将输入框的值传输到表格中的文本框的代码,并且必须将其指定为列...将在此处提交我的作业...我的演讲被告知要做个人...示例快照给了...任何人都可以帮我解决这个问题.... ???



I do not the code for transfer the value of input box to the textbox in form and it must be assign as column..will submit my assignment at here...my lecture told to do individual...the example snapshot is given...can anyone pls help me on this issue....???

Dim bread As Single
       bread = Val(InputBox("PLEASE ENTER THE QUANTITY OF BREAD:", "UNI10 MINI MART"))
       If bread > 10 Then
           MessageBox.Show("YOU ARE ONLY ALOW TO BUY MAXIMUM 10 ITEMS !!!")
       Else
           TextBox1.Text =

       End If

   End Sub







到目前为止我已经制作了一个项目..如果面包按钮是点击,它必须要求数量的数量..然后转移到一个文本框...当clik一个按钮时,它必须在另一个文本框中计算总成本




so far for one item i have made this..if the bread button is click,it must ask for number of quantity..thn transfer it to a temperory text box...and when clik a button it must calculate the total cost in another text box

推荐答案

试试这个

Try this instead
Dim bread As Single = InputBox("Please enter the amount of bread.", "Buy")
If bread > 10 Then
 MessageBox.Show("You may only buy 10 items at a time.", "Error", MessageBoxButtons.OK)
 TextBox1.Text = ""
Exit Sub
Else
 TextBox1.Text = bread
' Your code here
End If


这篇关于我duno如何将代码从放入框中转移到文本框中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆