-1
我真的不知道如何編碼流程。從數據庫中加載動態保存的按鈕
For Each dtrow In camBtnDtable.Rows
Dim cameraNumber = camBtnDtable.Select("ButtonName =" & " '" & "foo" & "'")(0)("cameraID")
Dim nBtn As New Button
nBtn.Text = "C-" & 'this should be cameraNumber e.g "C-01"
nBtn.Name = 'select from the database, I don't know if this is still important though
nBtn.Location = 'select x and y from database where name is this
AddHandler nBtn.Click, AddressOf nBtn_Click
picture.Controls.Add(nBtn)
Next
這是一個混亂的代碼,但是,一般來說,我想要的是從訪問數據庫加載按鈕的屬性。
序列化代碼中的'btn'包含了什麼? – AdorableVB
這是一個錯誤 - 它將成爲更長的答案的一部分,但我並沒有全部刪除它 – Plutonix
我認爲我太過分了。這是一個簡單的答案。我的錯。無論如何謝謝你總是幫助我。 – AdorableVB