- In the extension bar, click the AdBlock Plus icon
- Click the large blue toggle for this website
- Click refresh
- In the extension bar, click the AdBlock icon
- Under "Pause on this site" click "Always"
- In the extension bar, click on the Adguard icon
- Click on the large green toggle for this website
- In the extension bar, click on the Ad Remover icon
- Click "Disable on This Website"
- In the extension bar, click on the orange lion icon
- Click the toggle on the top right, shifting from "Up" to "Down"
- In the extension bar, click on the Ghostery icon
- Click the "Anti-Tracking" shield so it says "Off"
- Click the "Ad-Blocking" stop sign so it says "Off"
- Refresh the page
- In the extension bar, click on the uBlock Origin icon
- Click on the big, blue power button
- Refresh the page
- In the extension bar, click on the uBlock icon
- Click on the big, blue power button
- Refresh the page
- In the extension bar, click on the UltraBlock icon
- Check the "Disable UltraBlock" checkbox
- Please disable your Ad Blocker
- Disable any DNS blocking tools such as AdGuardDNS or NextDNS
- Disable any privacy or tracking protection extensions such as Firefox Enhanced Tracking Protection or DuckDuckGo Privacy.
If the prompt is still appearing, please disable any tools or services you are using that block internet ads (e.g. DNS Servers, tracking protection or privacy extensions).
Question
Pierce28
Hey,
I am currently working on a program to teach myself C#. In it, a person is "throwing" meatloaf at a picture of Hilary Clinton's head. (long story). I've created the picturebox containing Hilary's head from the toolbox, but I created my meatloaf pictureboxes from code. I have right clicked on Hilary's picture and selected "Send to Back", and used the Meatloaf.BringToFront();, but for some reason, the meatloaf always goes behind Hilary's head, making it hidden.
The code I used to set up the Meatloaf pictureboxes is
(global) public PictureBox[] picNewMeatLoaf = new PictureBox[20]; (In a FormLoad) for (int j = 1; j <= 19; j++) { picNewMeatLoaf[j] = new PictureBox(); picNewMeatLoaf[j].BringToFront(); } __________________________________ (In a AddMeatLoaf() procedure) this.SuspendLayout(); picNewMeatLoaf[i].Location = new Point(0, 0); picNewMeatLoaf[i].Size = new Size(75, 25); picNewMeatLoaf[i].BringToFront(); picNewMeatLoaf[i].Image = this.picMeatLoaf.Image; this.Controls.AddRange(new Control[] { picNewMeatLoaf[i] }); this.ResumeLayout(); ___________________________________ (in a timer) for (int j = 1; j < 20; j++) { if (this.picNewMeatLoaf[j].Top < 305 & picNewMeatLoaf[j].Left < 693) //305 is the ground level, 693 is the spot on Hilary's face to stop { this.picNewMeatLoaf[j].Top = picNewMeatLoaf[j].Top + 1; this.picNewMeatLoaf[j].Left = picNewMeatLoaf[j].Left + MeatLoafSpeed[j]; }
That is just the code related to the MeatLoaf picturebox, so obviously there is a lot more code. Note, this is my first real attempt at a program with C#, so the code isn't going to be the best.
Does anyone see what I'm doing wrong or have any suggestions? I'm all out of ideas, and I'd rather not have to just add it into the form1's background image. If you need anymore code or information, just let me know.
Oh, and if anyone has any ideas on how to make parts of picture boxes transparent, meaning they show the objects behind it, it would be VERY appreciated.
Pierce
Link to comment
https://www.neowin.net/forum/topic/559974-c-issue-with-making-one-picturebox-appear-ontop-of-another/Share on other sites
1 answer to this question
Recommended Posts