vb.net期末 vb期末考试试题及答案
vb.net图书借阅管理系统
看了一圈回来,发现期末了都是一些不读书的人再找枪手,
成都创新互联主营武侯网站建设的网络公司,主营网站建设方案,重庆APP开发,武侯h5成都微信小程序搭建,武侯网站营销推广欢迎武侯等地区企业咨询
希望,别做,才200分,为什么做?害人吗?
不过这样也行,我给你做,给我2000元吧,放点血,让你知道一下不读书的痛,而且我还会教你好多知识
零基础学习vb. net怎样学?
你得先补基础。
最好去学校,找计算机系的学生,抄下专业专业课程和对应的课本(说不定顺便能讨些旧课本),卖齐这些课本(一般学校里面就有书店)慢慢学。
(以下课程不全)
至少需要读一遍的:计算机导论、程序设计基础、软件工程、编译原理
重点学习的:算法与数据结构、面向对象程序设计
还有VB.Net需要一定的基础,建议先从 C++ 或 VB(版本6.0)入门
怎样在vb.net中实现gidview数据库在textbox中同步显示啊?
textbox同步显示,只要将数据库表的某列数据绑定这个文本框就可以实现,其他控件也是一样的。至于打印你用水晶报表就行了,挺简单的
vb.net的编程
Option Strict Off
Option Explicit On
Friend Class Form1
Inherits System.Windows.Forms.Form
Private Sub Command1_Click(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles Command1.Click
Dim j As Integer
Dim A(9) As Short
Dim D(9) As Short
Dim i As Short
Dim B As Short
Dim C As Short
Dim F As Short
Dim G As Boolean
Dim H() As Short
Dim K As Short
Dim S As String
C = 32767
For i = 1 To 10
A(i - 1) = CShort(InputBox("输入第 " i "个数"))
If B A(i - 1) Then B = A(i - 1)
If C A(i - 1) Then C = A(i - 1)
D(i - 1) = Int(Rnd() * 100 + 0.5)
If F D(i - 1) Then F = D(i - 1)
Next i
For i = 2 To 100
For j = 2 To Int(System.Math.Sqrt(i) + 0.5)
'UPGRADE_WARNING: Couldn't resolve default property of object j. Click for more: 'ms-help://MS.VSExpressCC.v80/dv_commoner/local/redirect.htm?keyword="6A50421D-15FE-4896-8A1B-2EC21E9037B2"'
'UPGRADE_WARNING: Mod has a new behavior. Click for more: 'ms-help://MS.VSExpressCC.v80/dv_commoner/local/redirect.htm?keyword="9B7D5ADD-D8FE-4819-A36C-6DEDAF088CC7"'
If i Mod j 0 Then
G = True
Else
G = False
Exit For
End If
Next j
If G = True Then
ReDim Preserve H(K)
H(K) = i
K = K + 1
End If
Next i
S = "2;"
For i = 0 To K - 1
S = S H(i) ";"
Next i
MsgBox("最大数为:" B ";最小数为:" C)
MsgBox("最大的随机数为:" F)
MsgBox("1--100之间共有" K + 1 "个素数:" S)
End Sub
End Class
请教vb.net的一点基础问题 玩家们帮个忙啊..
发一段代码给你,自己慢慢领悟
Imports System.Data
Imports System.Data.OleDb'声明命名空间
Public Class Form1
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click’按钮单击事件
Dim Connstring2 As String = "provider=microsoft.jet.oledb.4.0; data source=../../data.mdb"'定义连接字符串
Dim cn As New OleDb.OleDbConnection(Connstring2)
cn.Open()’打开数据库连接
Dim cmd As New OleDb.OleDbCommand
cmd.Connection = cn
cmd.CommandType = CommandType.Text
cmd.CommandText = "INSERT INTO [库存] VALUES (" textbox1.text ",'" textbox2.text "','" textbox3.text "','" textbox4.text "') "
cmd.ExecuteNonQuery() '执行sql语句并返回受影响的行数
MsgBox("成功添加一条记录", 64)
cn.Close()
End Sub
End Class
***************
这只是添加记录的代码,对数据库的其它操作都是大同小异!自己好好琢磨把!
期末老师让做一个比较有创意的vb.net小软件,无从下手!求帮忙
随手做了个打地鼠,代码拿去吧。
下图是10x10超大窗体“打地鼠”
直接新建个窗体,覆盖全部代码,不需要拖控件,全部动态创建了。
参数都在前面几行,可以随便改。
格子宽和高是70,间距20,因此横格子和竖格子不要超过10,不然窗体会扩张到非常大的程度。
调整时钟的Interval可决定地鼠的出现频率,你可以修改变化概率 = 15这句话改变出现几率。
Public Class Form1
Dim 横格子 = 4
Dim 竖格子 = 4
Dim 背景色 = Color.Bisque
Dim 打中色 = Color.LawnGreen
Dim 失误色 = Color.Red
Dim 按钮(横格子, 竖格子) As Button
Public WithEvents 时钟 As New Timer With {.Interval = 400}
Public WithEvents 分数板 As New Label With {.AutoSize = False, .Width = 120,
.Height = 26}
Dim 字体 = New Font("黑体", 14)
Dim 随机数 As New Random
Dim 打中数 As Integer = 0
Dim 分数 As Integer = 0
Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
Me.Font = 字体
For x = 1 To 横格子
For y = 1 To 竖格子
按钮(x, y) = New Button()
Me.Controls.Add(按钮(x, y))
按钮(x, y).Width = 70
按钮(x, y).Height = 70
按钮(x, y).Text = ""
按钮(x, y).Location = New Point((x - 1) * (按钮(x, y).Width + 20) +
20, (y - 1) * (按钮(x, y).Height + 20) + 20)
按钮(x, y).Name = String.Format("Button_{0}_{1}", x, y)
按钮(x, y).BackColor = 背景色
按钮(x, y).FlatStyle = FlatStyle.Flat
按钮(x, y).Tag = 0
AddHandler 按钮(x, y).Click, AddressOf 按钮点击
Next
Next
Me.Text = "打地鼠" " [空格键暂停]"
Me.KeyPreview = True
Dim k = 按钮(横格子, 竖格子)
Me.Width = k.Left + k.Width + 40
Me.Height = k.Top + k.Height + 65
Me.Controls.Add(分数板)
分数板.Location = New Point(Me.Width / 2 - 25, 0)
分数板.Text = "分数牌"
时钟.Enabled = True
End Sub
Private Sub 按钮点击(sender As Object, e As EventArgs)
If 时钟.Enabled = False Then Exit Sub
Dim 控件名 = CType(sender, Button).Name.Split("_")
Dim x = CInt(控件名(1)) '截取_分割的第二部分Button_{0}_{1}
Dim y = CInt(控件名(2)) '截取_分割的第三部分Button_{0}_{1}
If 按钮(x, y) IsNot Nothing Then
If 按钮(x, y).Text = "地鼠" Then
打中数 = 打中数 + 1
分数 = 分数 + 20
按钮(x, y).Text = 打中数 "!"
分数板.Text = "得分:" 分数
按钮(x, y).BackColor = 打中色
按钮(x, y).Tag = 1
ElseIf 按钮(x, y).Text = "" Then
分数 = 分数 - 20
If 分数 0 Then 分数 = 0
分数板.Text = "得分:" 分数
按钮(x, y).Text = "乱打!"
按钮(x, y).BackColor = 失误色
按钮(x, y).Tag = 2
End If
End If
End Sub
Private Sub 时钟_Tick(sender As Object, e As EventArgs) Handles 时钟.Tick
For x = 1 To 横格子
For y = 1 To 竖格子
Dim 变化概率 = 随机数.Next(1, 100)
If 变化概率 = 40 Then
If 按钮(x, y).Tag = 1 Or 按钮(x, y).Tag = 2 Then
按钮(x, y).Text = ""
按钮(x, y).BackColor = 背景色
按钮(x, y).Tag = 0
End If
End If
If 变化概率 = 15 Then
If 按钮(x, y).Text = "地鼠" Then
按钮(x, y).Text = ""
ElseIf 按钮(x, y).Text = "" Then
按钮(x, y).Text = "地鼠"
End If
End If
Next
Next
End Sub
Private Sub Form1_KeyUp(sender As Object, e As KeyEventArgs) Handles
MyBase.KeyUp
If e.KeyCode = Keys.Space Then 时钟.Enabled = Not 时钟.Enabled
End Sub
End Class
如满意,请采纳,谢谢。
文章题目:vb.net期末 vb期末考试试题及答案
标题网址:http://scyanting.com/article/hjsgcs.html