picturebox.visible problem
-
Hi I'm a newbie struggling with a picturebox. At construction time I load a jpg image into a picturebox and I have 3 radio-buttons that dictate what what is drawn in the GUI. When the picturebox is enabled & visible at construction time then it stays visible even if I make it invisible later by pressing a radiobutton (picturebox1.visible = false) . Can someone please tell me what I'm missing? Regards Tom
-
Hi I'm a newbie struggling with a picturebox. At construction time I load a jpg image into a picturebox and I have 3 radio-buttons that dictate what what is drawn in the GUI. When the picturebox is enabled & visible at construction time then it stays visible even if I make it invisible later by pressing a radiobutton (picturebox1.visible = false) . Can someone please tell me what I'm missing? Regards Tom
Hmm, just solved it myself... when I replace: BitmapCanvas.Visible = false; With: this.BitmapCanvas.Visible = false; Then I can make the visible picturebox go invisible! Wonder why that is needed? Probably a no-brainer Thomas
-
Hmm, just solved it myself... when I replace: BitmapCanvas.Visible = false; With: this.BitmapCanvas.Visible = false; Then I can make the visible picturebox go invisible! Wonder why that is needed? Probably a no-brainer Thomas
This problem happens when you have a parameter or variable in a method that has the same name as the field of a class, such as:
class MyClass
{
private int value;public MyClass(int value) { // value refers to the parameter // to use the field, as it has the same name, use this.value this.value = value; }
}
You can tell by hovering the mouse over
value
in the code editor.Dave
Binging is like googling, it just feels dirtier. Please take your VB.NET out of our nice case sensitive forum. Astonish us. Be exceptional. (Pete O'Hanlon)
BTW, in software, hope and pray is not a viable strategy. (Luc Pattyn) -
Hmm, just solved it myself... when I replace: BitmapCanvas.Visible = false; With: this.BitmapCanvas.Visible = false; Then I can make the visible picturebox go invisible! Wonder why that is needed? Probably a no-brainer Thomas
bimbambumbum wrote:
BitmapCanvas.Visible = false;
hover BitmapCanvas, right-click for "Go to definition" and see if that is what you expect it to be. :)
Luc Pattyn [Forum Guidelines] [Why QA sucks] [My Articles] Nil Volentibus Arduum
Please use <PRE> tags for code snippets, they preserve indentation, and improve readability.