重庆分公司,新征程启航
为企业提供网站建设、域名注册、服务器等服务
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
创新互联公司坚持“要么做到,要么别承诺”的工作理念,服务领域包括:做网站、成都做网站、企业官网、英文网站、手机端网站、网站推广等服务,满足客户于互联网时代的大余网站设计、移动媒体设计的需求,帮助企业找到有效的互联网解决方案。努力成为您成熟可靠的网络建设合作伙伴!
Dim aa As Integer = Val(TextBox1.Text)
Dim i As Integer
For i = 2 To aa
If aa Mod i = 0 Then
TextBox2.Text += i.ToString + " "
aa = aa / i
i = 2
End If
Next
End Sub
Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
TextBox1.Text = ss()
TextBox2.Text = ss()
End Sub
Function ss()
Randomize()
Dim a As Integer = Int(Rnd() * 100)
Return a
End Function
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
If Val(TextBox1.Text) + Val(TextBox2.Text) = Val(TextBox3.Text) Then
i += 1
Label3.Text = "正确"
Else
j += 1
Label3.Text = "错误"
End If
aa += 1
End Sub
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
TextBox1.Text = ss()
TextBox2.Text = ss()
TextBox3.Text = ""
Label3.Text = ""
End Sub
Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click
TextBox4.Text = "你已经答了" + aa.ToString + "题,答对" + i.ToString + "题," + "答错" + j.ToString + "题。"
End Sub
写程序不就行了,左边触发单击事件,然后执行相应的程序块之右边的内容变动就行了。
新建一个Sub : Main
Private Sub Main()
xxx.show 'xxx指启动窗体
'载入图片、数据库之类的
Unload xxx
{from}.show '{from}指主界面
End Sub
然后在工程-属性将"Main"作为启动对象