Check my code please

  • Thread starter Thread starter learn
  • Start date Start date
L

learn

Guest
Hi,

On the form, there is a PictureBox. If I assign an image for the picturebox, following code not works. If not assign the image, works fine. If delete class tryClass block, no error (even assign the image to the pictureBox).

Any idea?

Public Class tryClass
Private mProperty As Integer
Property tryProperty() As Integer
Get
Return (mProperty)
End Get
Set(ByVal Value As Integer)
mProperty = Value
End Set
End Property
End Class

Public Class Form1
Inherits System.Windows.Forms.Form

#Region " Windows Form Designer generated code "

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

End Sub

End Class
 
The code you posted doesn't really help us. Try posting the whole class, in [ vb ] tags, or (better yet) break your problem down and tell us the exact error you get.
 
Hi,

I made that simple and stil have the error message so that you all can check easily.

The error message was:

An unhandled exception of type 'System.Resources.MissingManifestResourceException' occurred in mscorlib.dll

Additional information: Could not find any resources appropriate for the specified culture (or the neutral culture) in the given assembly. Make sure "Form1.resources" was correctly embedded or linked into assembly "MyMultiThread".
baseName: Form1 locationInfo: MyMultiThread.Form1 resource file name: Form1.resources assembly: MyMultiThread, Version=1.0.979.1028, Culture=neutral, PublicKeyToken=null

Highlighted following line in 'Form Designer generated code':
Me.PictureBox1.Image = CType(resources.GetObject("PictureBox1.Image"), System.Drawing.Bitmap)
 
Try downloading service pack 2, there was an issue where serialized images would sometimes get corrupted on certain machines.
 
Back
Top