Selamlar, formumda picturebox uzerine buton koydum ve veritabanına kayıtlar yapıyorum. Kayıtlara bakarken, eğer resim varsa buton gorunmesin, yok ise ustte buton gorunsun istiyordum. Şoyle bir kod yazdım ama olmadı. Yardımcı olabilirmisiniz teşekkurler.

Alıntı:
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
For Each pic As PictureBox In Me.Controls
If pic.Image Is Nothing Then
Button1.Visible = True
Else
Button1.Visible = False
End If
Next
Me.TBTableAdapter.Fill(Me.TBDataSet1.TB)
Me.FormBorderStyle = Windows.Forms.FormBorderStyle.Sizable
End Sub
'PictureBox'ımın ismi FotoPictureBox

__________________