VB学习第二周--加法器的实现

VB学习第二周--加法器的实现,第1张

概述加法器的实现: Public Class Form1 Private Sub TextBox1_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TextBox1.TextChanged If Not IsNumeric(TextBox1.Text) Then

加法器的实现:

Public Class Form1    Private Sub TextBox1_TextChanged(ByVal sender As System.Object,ByVal e As System.EventArgs) Handles TextBox1.TextChanged        If Not IsNumeric(TextBox1.Text) Then            TextBox1.Text = ""        End If    End Sub    Private Sub TextBox2_TextChanged(ByVal sender As System.Object,ByVal e As System.EventArgs) Handles TextBox2.TextChanged        If Not IsNumeric(TextBox2.Text) Then            TextBox2.Text = ""        End If    End Sub    Private Sub button1_Click(ByVal sender As System.Object,ByVal e As System.EventArgs) Handles button1.Click        TextBox3.Text = Val(TextBox1.Text) + Val(TextBox2.Text)    End Sub    Private Sub button2_Click(ByVal sender As System.Object,ByVal e As System.EventArgs) Handles button2.Click        TextBox2.Text = ""        TextBox1.Text = ""        TextBox3.Text = ""        TextBox1.Focus()    End Sub    Private Sub button3_Click(ByVal sender As System.Object,ByVal e As System.EventArgs) Handles button3.Click        End    End Sub    Private Sub Form1_Load(ByVal sender As System.Object,ByVal e As System.EventArgs) Handles MyBase.Load    End SubEnd Class

总结

以上是内存溢出为你收集整理的VB学习第二周--加法器的实现全部内容,希望文章能够帮你解决VB学习第二周--加法器的实现所遇到的程序开发问题。

如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。

欢迎分享,转载请注明来源:内存溢出

原文地址: http://outofmemory.cn/langs/1281051.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2022-06-09
下一篇 2022-06-09

发表评论

登录后才能评论

评论列表(0条)

保存