189 8069 5689

vb.net小程序 一个简单的vb小程序

VB.net做一个小程序 求教

Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load

泰安ssl适用于网站、小程序/APP、API接口等需要进行数据传输应用场景,ssl证书未来市场广阔!成为创新互联的ssl证书销售渠道,可以享受市场价格4-6折优惠!如果有意向欢迎电话联系或者加微信:18982081108(备注:SSL证书合作)期待与您的合作!

Dim oleDbConnection1 As OleDb.OleDbConnection

Dim oledbDataAdapter As OleDb.OleDbDataAdapter

Dim oledbData As DataSet = New DataSet

Dim strConnect As String = "Provider= OraOLEDB.Oracle;Data Source=888;User ID=888;Password=888;"

oleDbConnection1 = New System.Data.OleDb.OleDbConnection(strConnect)

Dim strSql As String

strSql = "select *" " from xx"

Dim oledbCommand As OleDb.OleDbCommand

oledbCommand.CommandText = strSql

oledbCommand.CommandType = CommandType.Text

oledbCommand.Connection = oleDbConnection1

oledbDataAdapter.SelectCommand = oledbCommand

oleDbConnection1.Open()

oledbDataAdapter.Fill(oledbData, "gy_bingrenxx")

oleDbConnection1.Close()

'在窗体上添加一个DataGridView控件,在这个位置加一句代码

DataGridView1.DataSource = oledbDataAdapter.Tables("gy_bingrenxx")

End Sub

VB.NET写的智能设备小程序,需要GC么?Application.exit是否能释放资源?

如果一个程序要用Application.exit来退出,那说明太失败了。。。

一般来说,都是用close关闭就可以了。

用.NET平台开发,只要你在操作数据库或者IO的时候没有忘记关闭资源连接,一般是不需要你手动释放的。

vb.net的小程序

你要做一个考试系统??这可不是小程序,不过如果是超精简的话,我倒可以写个思路给你。

在form添加一个label 和四个command1(组成一个控件组修改index属性,按顺序设置为ABCD)和一个command2(可要可不要,这个是作为跳过用的)

定义全局变量 questions() as string,questionid as integer,answers() as string

在form_load中,将问题和答案读入questions()和answers()中,然后将第一个问题显示在label中,设置questionid=1

之后在command1_click(index as integer)中用select语句根据questionid将答案和回答比较,然后显示下一题,同时更改questionid。。。大概就这样

command2_Click()就直接显示下一题和更改questionid

问题结束后就OK了,之后要加什么可以自己加上去~

求写一个VB.Net小程序

随机生成2-5阶方阵:

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click

Dim d(,) As Integer

Dim n As Integer

Dim i As Integer

Dim j As Integer

Randomize()

n = Int(4 * Rnd() + 2)

ReDim d(n, n)

Label1.Text = ""

For i = 1 To n

For j = 1 To n

d(i, j) = Int(Rnd() + 0.5)

Label1.Text = Label1.Text d(i, j) " "

Next

Label1.Text = Label1.Text vbCrLf

Next

End Sub


网站名称:vb.net小程序 一个简单的vb小程序
文章URL:http://cdxtjz.cn/article/hepoee.html

其他资讯