Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. C# area map

C# area map

Scheduled Pinned Locked Moved C#
csharpjavascripthtmlhelp
7 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • Z Offline
    Z Offline
    Zap Man
    wrote on last edited by
    #1

    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.

    F 1 Reply Last reply
    0
    • Z Zap Man

      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.

      F Offline
      F Offline
      fly904
      wrote on last edited by
      #2

      A transparent panel?

      hmmm pie

      Z 1 Reply Last reply
      0
      • F fly904

        A transparent panel?

        hmmm pie

        Z Offline
        Z Offline
        Zap Man
        wrote on last edited by
        #3

        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?

        F 1 Reply Last reply
        0
        • Z Zap Man

          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?

          F Offline
          F Offline
          fly904
          wrote on last edited by
          #4

          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

          Z 1 Reply Last reply
          0
          • F fly904

            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

            Z Offline
            Z Offline
            Zap Man
            wrote on last edited by
            #5

            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); }

            F 1 Reply Last reply
            0
            • Z Zap Man

              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); }

              F Offline
              F Offline
              fly904
              wrote on last edited by
              #6

              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

              Z 1 Reply Last reply
              0
              • F fly904

                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

                Z Offline
                Z Offline
                Zap Man
                wrote on last edited by
                #7

                That did it lol. Thanks allot dude!!!!!:cool:

                1 Reply Last reply
                0
                Reply
                • Reply as topic
                Log in to reply
                • Oldest to Newest
                • Newest to Oldest
                • Most Votes


                • Login

                • Don't have an account? Register

                • Login or register to search.
                • First post
                  Last post
                0
                • Categories
                • Recent
                • Tags
                • Popular
                • World
                • Users
                • Groups