Hi, i'm completely new to VB but not at all new to programming. I'm trying to create a very basic first program with Visual Basic .Net 2005 but keep getting an error that I have no idea how to handle.
My code:
Public
Class Form1Private mImage As ImagePrivate Sub Panel1_Paint(ByVal sender As System.Object, ByVal e As System.Windows.Forms.PaintEventArgs) Handles Panel1.PaintmImage = Bitmap.FromFile(
"C:\valve2.bmp")e.Graphics.DrawImage(mImage, 5, 5)
End SubPrivate Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.LoadEnd SubEnd
Class
My error:
Request for the permission of type 'System.Security.Permissions.FileIOPermission, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.
This error targets line 4, the "mImage = ..." part. The image exists and is located where I declare it to be. I have a form and a panel in design view. I don't know what else is wrong, but the troubleshooting tells me to use "isolated storage" (no idea what that is) or obtain/follow security permissions. Can anyone help?
(When i strip the program down to just that line --the mImage assignment line-- i get the error even then)