看了一圈回來,發(fā)現(xiàn)期末了都是一些不讀書的人再找槍手,
成都創(chuàng)新互聯(lián)主營武侯網(wǎng)站建設的網(wǎng)絡公司,主營網(wǎng)站建設方案,重慶APP開發(fā),武侯h5成都微信小程序搭建,武侯網(wǎng)站營銷推廣歡迎武侯等地區(qū)企業(yè)咨詢
希望,別做,才200分,為什么做?害人嗎?
不過這樣也行,我給你做,給我2000元吧,放點血,讓你知道一下不讀書的痛,而且我還會教你好多知識
你得先補基礎。
最好去學校,找計算機系的學生,抄下專業(yè)專業(yè)課程和對應的課本(說不定順便能討些舊課本),賣齊這些課本(一般學校里面就有書店)慢慢學。
(以下課程不全)
至少需要讀一遍的:計算機導論、程序設計基礎、軟件工程、編譯原理
重點學習的:算法與數(shù)據(jù)結構、面向對象程序設計
還有VB.Net需要一定的基礎,建議先從 C++ 或 VB(版本6.0)入門
textbox同步顯示,只要將數(shù)據(jù)庫表的某列數(shù)據(jù)綁定這個文本框就可以實現(xiàn),其他控件也是一樣的。至于打印你用水晶報表就行了,挺簡單的
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 "個數(shù)"))
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("最大數(shù)為:" B ";最小數(shù)為:" C)
MsgBox("最大的隨機數(shù)為:" F)
MsgBox("1--100之間共有" K + 1 "個素數(shù):" S)
End Sub
End Class
發(fā)一段代碼給你,自己慢慢領悟
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()’打開數(shù)據(jù)庫連接
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() '執(zhí)行sql語句并返回受影響的行數(shù)
MsgBox("成功添加一條記錄", 64)
cn.Close()
End Sub
End Class
***************
這只是添加記錄的代碼,對數(shù)據(jù)庫的其它操作都是大同小異!自己好好琢磨把!
隨手做了個打地鼠,代碼拿去吧。
下圖是10x10超大窗體“打地鼠”
直接新建個窗體,覆蓋全部代碼,不需要拖控件,全部動態(tài)創(chuàng)建了。
參數(shù)都在前面幾行,可以隨便改。
格子寬和高是70,間距20,因此橫格子和豎格子不要超過10,不然窗體會擴張到非常大的程度。
調整時鐘的Interval可決定地鼠的出現(xiàn)頻率,你可以修改變化概率?=?15這句話改變出現(xiàn)幾率。
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?分數(shù)板?As?New?Label?With?{.AutoSize?=?False,?.Width?=?120,?
.Height?=?26}
Dim?字體?=?New?Font("黑體",?14)
Dim?隨機數(shù)?As?New?Random
Dim?打中數(shù)?As?Integer?=?0
Dim?分數(shù)?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(分數(shù)板)
分數(shù)板.Location?=?New?Point(Me.Width?/?2?-?25,?0)
分數(shù)板.Text?=?"分數(shù)牌"
時鐘.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
打中數(shù)?=?打中數(shù)?+?1
分數(shù)?=?分數(shù)?+?20
按鈕(x,?y).Text?=?打中數(shù)??"!"
分數(shù)板.Text?=?"得分:"??分數(shù)
按鈕(x,?y).BackColor?=?打中色
按鈕(x,?y).Tag?=?1
ElseIf?按鈕(x,?y).Text?=?""?Then
分數(shù)?=?分數(shù)?-?20
If?分數(shù)??0?Then?分數(shù)?=?0
分數(shù)板.Text?=?"得分:"??分數(shù)
按鈕(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?變化概率?=?隨機數(shù).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
如滿意,請采納,謝謝。