C# area map
-
Could someone help out. I'm bulding a windows application that uses a skin instead of the form border that windows provides. Everything is going well except for my bosses specs. I am suppose to map the area on the skin that needs to be an onclick event. Kind of like an html and javaScript where your able to map a certain section of an image and make it a clickable link.
-
Could someone help out. I'm bulding a windows application that uses a skin instead of the form border that windows provides. Everything is going well except for my bosses specs. I am suppose to map the area on the skin that needs to be an onclick event. Kind of like an html and javaScript where your able to map a certain section of an image and make it a clickable link.
-
Yep tried that. And I would think that it would work but it puts a black box over my image. I even tried to set the transparencyKey and that just cut a hole through my app. But in idea a transparent panel should work. Any thoughts?
I tried with a background image and the following worked fine: this.panel1.BackColor = System.Drawing.Color.Transparent; this.panel1.Click += new System.EventHandler(this.panel1_Click); So panel with a background image instead of a pisture box would work fine.
hmmm pie
-
I tried with a background image and the following worked fine: this.panel1.BackColor = System.Drawing.Color.Transparent; this.panel1.Click += new System.EventHandler(this.panel1_Click); So panel with a background image instead of a pisture box would work fine.
hmmm pie
ok well my app is a little different. here a small sample of the app. //this is my overloaded constructor //gets loaded when the form is first Initialized public HighCapacity(Skins sk) { // I put the panel before the InitializeComponent() to get it to load. // everything will need to be loaded dynamically InitializeComponent(); //sets the border syle to none to I can add my own this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None; //menuOff is a PictureBox that displays as the form this.menuOff.Image = new Bitmap(sk.DayMenuSkin); this.menuOff.SizeMode = PictureBoxSizeMode.CenterImage; this.menuOff.SizeMode = PictureBoxSizeMode.StretchImage; this.ClientSize = new Size(800, 600); //set the background of menuOff if (sk.BackgroundSkinType == "COLOR") { //this.BackColor = Color.FromArgb(); } else if (sk.BackgroundSkinType == "IMAGE") { this.menuOff.BackgroundImage = new Bitmap(sk.BackgroundImage); } else { this.BackColor = Color.Black; ; } this.menuOff.SizeMode = PictureBoxSizeMode.AutoSize; this.Controls.Add(this.menuOff); }
-
ok well my app is a little different. here a small sample of the app. //this is my overloaded constructor //gets loaded when the form is first Initialized public HighCapacity(Skins sk) { // I put the panel before the InitializeComponent() to get it to load. // everything will need to be loaded dynamically InitializeComponent(); //sets the border syle to none to I can add my own this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None; //menuOff is a PictureBox that displays as the form this.menuOff.Image = new Bitmap(sk.DayMenuSkin); this.menuOff.SizeMode = PictureBoxSizeMode.CenterImage; this.menuOff.SizeMode = PictureBoxSizeMode.StretchImage; this.ClientSize = new Size(800, 600); //set the background of menuOff if (sk.BackgroundSkinType == "COLOR") { //this.BackColor = Color.FromArgb(); } else if (sk.BackgroundSkinType == "IMAGE") { this.menuOff.BackgroundImage = new Bitmap(sk.BackgroundImage); } else { this.BackColor = Color.Black; ; } this.menuOff.SizeMode = PictureBoxSizeMode.AutoSize; this.Controls.Add(this.menuOff); }
this.menuOff.Controls.Add(this.panel1); Visual studio is a bit silly when it comes to moving the transparent panel over the image as it resets the above to add it to the form instead which is why it gives a black box.
hmmm pie
modified on Monday, February 23, 2009 6:22 AM
-
this.menuOff.Controls.Add(this.panel1); Visual studio is a bit silly when it comes to moving the transparent panel over the image as it resets the above to add it to the form instead which is why it gives a black box.
hmmm pie
modified on Monday, February 23, 2009 6:22 AM