VB.net 简单程序的结构 (注意和VB过程的区别)
来源:互联网 发布:linux查询cpu使用情况 编辑:程序博客网 时间:2024/05/15 23:40
Imports System.IO
Public Class Form1
Dim s1, s2, s3, s4, s5
Dim search As String
Dim a As Integer
----------------------------------------------------------------------------------------------------------------------------------------------------
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
End Sub
----------------------------------------------------------------------------------------------------------------------------------------------------
Private Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button1.Click
s1 = "Familiar concepts, language, and real-world conventions in an interface can take advantage of knowledge users already have and, therefore, can make the interface more familiar and easier to use. "
TextBox1.Text = s1 '按下button1 输出S1的内容到TextBox1
End Sub
----------------------------------------------------------------------------------------------------------------------------------------------------
Private Sub Button2_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button2.Click
s2 = "Making use of users' prior knowledge of and experience with other parts of the same application and other applications on the same platform will make an interface more familiar and easier to use."
TextBox1.Text = s2 '按下button1 输出S1的内容到TextBox1
End Sub
----------------------------------------------------------------------------------------------------------------------------------------------------
Private Sub Button3_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button3.Click
s3 = "This heuristic relates to the visual search aspect of perception and also to memory. The more clutter, the more information the user's eyes must search through to find the desired information. In addition, the more information coming into a user's working memory through perception as a visual search proceeds, the more information there is to interfere with the retrieval from long-term memory of the information that is relevant to the task. "
TextBox1.Text = s3 '按下button1 输出S1的内容到TextBox1
End Sub
----------------------------------------------------------------------------------------------------------------------------------------------------
Private Sub Button4_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button4.Click
s4 = "Errors can come about because users make mistakes in perception, lack knowledge of what to do next, recall the gist of commands rather than the precise syntax—or they may simply slip when they go to type or point. Some of these mistakes can be prevented by, say, an interface only showing the actions that are acceptable at a particular point (for example, by graying out inappropriate buttons). Other mistakes can be caught as soon as users make them (for example, by the interface refusing to accept an incorrect abbreviation of a U.S. state in an address form). "
TextBox1.Text = s4 '按下button1 输出S1的内容到TextBox1
End Sub
----------------------------------------------------------------------------------------------------------------------------------------------------
Private Sub Button5_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button5.Click
s5 = "This heuristic is an admonition to give the user enough information to understand how to use an application. An application's search feature should allow desired information to be found when a user specifies the gist of its meaning rather than precise wording: people usually remember only gists, not exact wordings. "
TextBox1.Text = s5 '按下button1 输出S1的内容到TextBox1
End Sub
----------------------------------------------------------------------------------------------------------------------------------------------------
Private Sub Button6_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button6.Click
s1 = "Familiar concepts, language, and real-world conventions in an interface can take advantage of knowledge users already have and, therefore, can make the interface more familiar and easier to use. "
s2 = "Making use of users' prior knowledge of and experience with other parts of the same application and other applications on the same platform will make an interface more familiar and easier to use."
s3 = "This heuristic relates to the visual search aspect of perception and also to memory. The more clutter, the more information the user's eyes must search through to find the desired information. In addition, the more information coming into a user's working memory through perception as a visual search proceeds, the more information there is to interfere with the retrieval from long-term memory of the information that is relevant to the task. "
s4 = "Errors can come about because users make mistakes in perception, lack knowledge of what to do next, recall the gist of commands rather than the precise syntax—or they may simply slip when they go to type or point. Some of these mistakes can be prevented by, say, an interface only showing the actions that are acceptable at a particular point (for example, by graying out inappropriate buttons). Other mistakes can be caught as soon as users make them (for example, by the interface refusing to accept an incorrect abbreviation of a U.S. state in an address form). "
s5 = "This heuristic is an admonition to give the user enough information to understand how to use an application. An application's search feature should allow desired information to be found when a user specifies the gist of its meaning rather than precise wording: people usually remember only gists, not exact wordings. "
search = TextBox2.Text
If Len(search) = 0 Then
TextBox1.Text = "Please enter a valid search string."
TextBox2.Focus()
If Len(search) < 3 Then TextBox1.Text = "Please enter a string that is 3 characters or longer."
TextBox2.Focus()
Else
a = InStr(s1, search)
If a <> 0 Then '若S1中搜索结果不为0,则输出S1
TextBox1.Text = "Match between system and the real world:" + vbCrLf + vbCrLf + s1
Else
a = InStr(s2, search) '若S2中搜索结果不为0,则输出S1
If a <> 0 Then
TextBox1.Text = "Consistency and standards:" + vbCrLf + vbCrLf + s2
Else
a = InStr(s3, search) '若S3中搜索结果不为0,则输出S1
If a <> 0 Then
TextBox1.Text = "Aesthetic and minimalist design:" + vbCrLf + vbCrLf + s3
Else
a = InStr(s4, search) '若S4中搜索结果不为0,则输出S1
If a <> 0 Then
TextBox1.Text = "Help users recognize, diagnose, and recover from errors:" + vbCrLf + vbCrLf + s4
Else
a = InStr(s5, search) '若S5中搜索结果不为0,则输出S1
If a <> 0 Then '若S1-S5都搜索结果数为0,则输出提示
TextBox1.Text = "Help and documentation:" + vbCrLf + vbCrLf + s5
Else
TextBox1.Text = "No Match Found"
End If
End If
End If
End If
End If
End If
End Sub
Private Sub Textbox2_Change()
TextBox1.Text = ""
End Sub
----------------------------------------------------------------------------------------------------------------------------------------------------End Class
- VB.net 简单程序的结构 (注意和VB过程的区别)
- vb.net面向对象(函数和过程的区别)
- VB和VB.NET的大致区别
- VB和VB.NET的大致区别
- VB.Net中结构和类的区别
- 一个简单的VB.net程序
- vb.net graphic 简单的画图程序
- c#.net 和vb.net的区别
- vb.net的关键字和结构体
- vb.net的过程和函数
- 【VB.NET视频】VB与VB.NET的区别
- VB与VB.NET的区别
- VB与VB.NET的区别
- VB与VB.net的区别
- vb.net与vb的区别
- 【转】VB6和VB.NET的区别
- vb.net和c#的区别
- VB.Net Show和ShowDialog的区别
- 内存对齐(自然对齐)
- Ubuntu 11.04 amd64 试用----浏览器安装 adobe falsh
- 限制对象只能在堆上产生
- 4.6把一个字符串中某一位数(start)开始,复制len个字符到另一个字符串
- jetway_loves_programming——windows7下安装配置sql server2000
- VB.net 简单程序的结构 (注意和VB过程的区别)
- ubuntu vi编辑器的设置
- 时间选择器TimePicker
- window live writer出现日志服务器错误
- 修改window.confirm的按钮文字
- jsp的九大内置对象request response session等常用方法介绍
- SQL到NOSQL的思维转变
- JOJ 2109 && POJ 1981 Circle and Points 计算几何 单位圆覆盖问题
- VS2008无法打开gl/glaux.h头文件的解决方法