Im new here. My name is Bill and I might be bugging you guy regularly now! I have been developing applications for about 12 years now. I am now learning VB.net. It is very similar to the Powerbuilder that Ive been using for the past 7 years. I am working my way though the tutorials in the book Visual Basic.Net Step by Step. Im still in the beginning of the book. I am add script to a menu clicked event. I copied the following code right out of the book:
OpenFileDialog1.Filter = "Bitmaps (*.bmp)|*.bmp"
If OpenFileDialog1.ShowDialog() = DialogResult.OK Then
PictureBox1.Image = System.Drawing.Image.FromFile _
(OpenFileDialog1.FileName)
mnuCloseItem.Enabled = True
End If
I get an undeclared variable error on OpenFileDialog1. When I look at they solution in the book, it has the same code and no error. Can someone point me in the right direction to track this down? I dont want to just copy the books solution without understanding.
Thanks,
Bill
OpenFileDialog1.Filter = "Bitmaps (*.bmp)|*.bmp"
If OpenFileDialog1.ShowDialog() = DialogResult.OK Then
PictureBox1.Image = System.Drawing.Image.FromFile _
(OpenFileDialog1.FileName)
mnuCloseItem.Enabled = True
End If
I get an undeclared variable error on OpenFileDialog1. When I look at they solution in the book, it has the same code and no error. Can someone point me in the right direction to track this down? I dont want to just copy the books solution without understanding.
Thanks,
Bill