VB转VB.NET问题
我以前学过vb6.0,学的还不错,自己做了一套程序,那是XP年代,现在前后是WIN7,WIN8了,之前做的程序越来越不能兼容了,可数据库不能丢,所以开始学了。现遇到了个小麻烦请各位高手帮忙。
第一个:
Private Sub Command1_Click()
CommonDialog1.filename = Text1.Text
CommonDialog1.Filter = "图象文件[*.jpg:*.BMP]|*.jpg;*.BMP"
CommonDialog1.DialogTitle = "请选择图象文件名"
CommonDialog1.ShowOpen
If Err <> vbCancel Then
Dim filename As String
Text1.SetFocus
filename = CommonDialog1.filename
Text1.Text = filename
Image1.Picture = LoadPicture(Text1.Text)
CommonDialog1.filename = ""
Else
End If
End Sub
第二个:
Private Sub Text4_Change()
datPrimaryRS2.RecordSource = "select * from biao where (biao." & Combo1.Text & " like + '" + Text4.Text + "'+'%')"
datPrimaryRS2.Refresh
End Sub